What registry I have to pass when installing kamel on kubernetes?

5/21/2019

I have installed kubernetes in AWS ec2 instance. I'm not using any minikube or openshift. I'm trying to install kamel on top of kubernetes to run my integration code. When I tried to run kamel install command its throwing below error,

Error: cannot find automatically a registry where to push images

When I tried running as root user below error is thrown,

Error: cannot get current namespace: open /root/.kube/config: no such file or directory

I'd like to know what registry I have to pass while running kamel install command. I have docker hub account with a demo repository. Should I pass something like,

kamel install --registry hubusername/reponame

What I'm not getting is after I passed value, I'm getting below success message,

Camel K installed in namespace default

When I tried to run a sample groovy script its getting hanged after following message

kamel run hello.groovy --dev
Integration "hello" created

NAMESPACE     NAME                                       READY   STATUS    RESTARTS   AGE   IP               NODE           NOMINATED NODE   READINESS GATES
default       camel-k-operator-587b579567-m26rs          0/1     Pending   0          30m   <none>           <none>         <none>           <none>

Name:               camel-k-operator-587b579567-m26rs
Namespace:          default
Priority:           0
PriorityClassName:  <none>
Node:               <none>
Labels:             camel.apache.org/component=operator
                    name=camel-k-operator
                    pod-template-hash=587b579567
Annotations:        <none>
Status:             Pending
IP:                 
Controlled By:      ReplicaSet/camel-k-operator-587b579567
Containers:
  camel-k-operator:
    Image:      docker.io/apache/camel-k:0.3.3
    Port:       <none>
    Host Port:  <none>
    Command:
      camel-k
    Environment:
      WATCH_NAMESPACE:  default (v1:metadata.namespace)
      OPERATOR_NAME:    camel-k
      POD_NAME:         camel-k-operator-587b579567-m26rs (v1:metadata.name)
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from camel-k-operator-token-prjhp (ro)
Conditions:
  Type           Status
  PodScheduled   False 
Volumes:
  camel-k-operator-token-prjhp:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  camel-k-operator-token-prjhp
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason            Age                 From               Message
  ----     ------            ----                ----               -------
  Warning  FailedScheduling  38s (x23 over 31m)  default-scheduler  0/1 nodes are available: 1 node(s) had taints that the pod didn't tolerate.

Can you please help me out here? Thank you for your time.

-- Shr4N
apache-camel
docker
kubernetes

1 Answer

5/21/2019

If you installed a single node Kubernetes chances are your only node is a master node. Which is why Kubernetes won't schedule your job. Check this by running:

kubectl get node

If your only node shows 'master' in its ROLES column - than you need to untaint it to allow scheduling:

kubectl taint nodes --all node-role.kubernetes.io/master-

Try to rerun you kamel job afer that.

-- antweiss
Source: StackOverflow