在Kubernetes上安装Kamel时,我必须通过什么注册表



我已经在AWS EC2实例中安装了Kubernetes。我不使用任何Minikube或OpenShift。我正在尝试在Kubernetes顶部安装Kamel来运行我的集成代码。当我尝试运行kamel install命令以下命令以下错误时,

Error: cannot find automatically a registry where to push images

当我尝试以root用户为单位以下错误的抛出以下错误时,

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

我想知道在运行kamel install命令时必须通过的注册表。我有一个带有演示存储库的Docker Hub帐户。我应该通过吗?

kamel install --registry hubusername/reponame

通过价值之后,我没有得到的是,我要低于成功消息,

Camel K installed in namespace default

当我尝试运行一个示例式脚本脚本时,它在以下消息后被绞死

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.

您能在这里帮我吗?谢谢您的宝贵时间。

如果安装了单个节点kubernetes机会是您唯一的节点是主节点。这就是为什么Kubernetes不会安排您的工作。通过运行:

来检查一下
kubectl get node

如果您唯一的节点在其角色列中显示"主" - 您需要取消它以允许安排:

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

尝试重新运行您的kamel工作。

最新更新