You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/05/29 15:35:13 UTC

[GitHub] [camel-k] benbuzzelli opened a new issue #1476: Kamel run fails to pull in camel-k-builder after installing with helm

benbuzzelli opened a new issue #1476:
URL: https://github.com/apache/camel-k/issues/1476


   ### Background
   
   I am trying to run Apache Camel K in my Kubernetes environment. We have a registry set up with a secret name, username, and password. Our registry has a private and public address. I decided to use `helm` to install `camel-k` into my kubernetes namespace `camel-caravan`. I was successful in installing camel-k, however, my `helloworld.groovy` route fails in `phase Building Kit`. Below is a more detailed description of my setup and error.
   
   ---
   **Setup**
   
   I have installed camel-k with helm using this command:
   
   ```
   helm install --set platform.build.registry.address=<my.io> --set platform.build.registry.secret=<my-regcred-secret> --set platform.build.registry.insecure=true --set platform.build.publishStrategy=Kaniko  camel-k .
   ```
   
   And check that the pod is up in kubernetes:
   ```
   $ kubectl get pods
   NAME                                READY   STATUS    RESTARTS   AGE
   camel-k-operator-6df876d8df-pkhdq   1/1     Running   0          22m
   ```
   ---
   **Running the Route**
   
   I then run my `helloworld.groovy` route with the following command:
   
   ```
   kamel run helloworld.groovy --dev
   ```
   
   This is my `helloworld.groovy` file:
   ```
   from('timer:tick?period=3000')
     .setBody().constant('Hello world from Camel K')
     .to('log:info')
   ```
   
   ---
   **Kubernetes Namespace**
   
   Here's the role and rolebinding in my namespace:
   
   ```
   $ kubectl get role
   NAME               AGE
   camel-k-operator   22m
   ```
   
   ```
   kubectl get rolebinding
   NAME                       AGE
   camel-k-operator           22m
   clusterrolebinding-8mnvt   19h
   clusterrolebinding-98j9b   19h
   clusterrolebinding-f69v5   19h
   clusterrolebinding-f8lbj   19h
   ```
   
   ---
   **Error and Logs**
   
   This is the main error found in the camel-k-operator pod:
   ```
   $ kubectl logs -f camel-k-operator-6df876d8df-zrm6k
   
   ...
   "error":"cannot create build pod: pods \"camel-k-kit-br7gkofag096rp8c3e7g-builder\" is 
   forbidden: error looking up service account camel-caravan/camel-k-builder: serviceaccount 
   \"camel-k-builder\" not found","errorVerbose":"pods \"camel-k-kit-br7gkofag096rp8c3e7g-
   builder\" is forbidden: error looking up service account camel-caravan/camel-k-builder
   ...
   ```
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] nicolaferraro commented on issue #1476: Kamel run fails to pull in camel-k-builder after installing with helm

Posted by GitBox <gi...@apache.org>.
nicolaferraro commented on issue #1476:
URL: https://github.com/apache/camel-k/issues/1476#issuecomment-638260842


   I'm not seeing this error, maybe there are some old resources (sa, roles, rolebinding) that prevent the creation of the builder roles. Maybe you can try with an empty namespace @benbuzzelli .
   
   Here's what I get on a fresh Minikube:
   
   ```
   [nferraro@localhost ~]$ k get crd | grep camel
   No resources found in test namespace.
   [nferraro@localhost ~]$ k get clusterrole | grep camel
   [nferraro@localhost ~]$ k get role
   No resources found in test namespace.
   [nferraro@localhost ~]$ k get rolebinding
   No resources found in test namespace.
   [nferraro@localhost ~]$ k get sa
   No resources found in test namespace.
   [nferraro@localhost ~]$ k get pod
   No resources found in test namespace.
   [nferraro@localhost ~]$ 
   [nferraro@localhost ~]$ 
   [nferraro@localhost ~]$ helm repo add camel-k https://apache.github.io/camel-k/charts
   "camel-k" has been added to your repositories
   [nferraro@localhost ~]$ 
   [nferraro@localhost ~]$ 
   [nferraro@localhost ~]$ 
   [nferraro@localhost ~]$ helm install --set platform.build.registry.address=docker.io --set platform.build.registry.organization=boxnetjvm --set platform.build.registry.secret=dockerhub --set platform.build.publishStrategy=Kaniko --generate-name camel-k/camel-k
   NAME: camel-k-1591195401
   LAST DEPLOYED: Wed Jun  3 16:43:24 2020
   NAMESPACE: test
   STATUS: deployed
   REVISION: 1
   TEST SUITE: None
   NOTES:
   Connect the world with Camel K on Kubernetes!
   [nferraro@localhost ~]$ 
   [nferraro@localhost ~]$ 
   [nferraro@localhost ~]$ k get pod
   NAME                                READY   STATUS    RESTARTS   AGE
   camel-k-operator-6846d5f7f9-m6f79   1/1     Running   0          6s
   [nferraro@localhost ~]$ k get sa
   NAME               SECRETS   AGE
   camel-k-operator   1         8s
   default            1         16s
   [nferraro@localhost ~]$ kamel run ~/git/apache/camel-k/examples/simple.groovy 
   integration "simple" created
   [nferraro@localhost ~]$
   [nferraro@localhost ~]$
   [nferraro@localhost ~]$ k get sa
   NAME               SECRETS   AGE
   camel-k-builder    1         9s
   camel-k-operator   1         83s
   default            1         91s
   [nferraro@localhost ~]$ k get role
   NAME               CREATED AT
   camel-k-builder    2020-06-03T14:44:38Z
   camel-k-operator   2020-06-03T14:43:24Z
   [nferraro@localhost ~]$ k get pod
   NAME                                       READY   STATUS     RESTARTS   AGE
   camel-k-kit-brbre9npf5202vcui9u0-builder   0/1     Init:0/1   0          18s
   camel-k-operator-6846d5f7f9-m6f79          1/1     Running    0          92s
   [nferraro@localhost ~]$
   [nferraro@localhost ~]$
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org