迁移Kubernetes集群时出现CreateContainerConfigError

时间:2019-10-02 10:11:20

标签: amazon-web-services kubernetes kubectl kubernetes-secrets

我们正在将K8S集群迁移到新的AWS区域。

在需要迁移的Dev服务器上使用以下命令:

  

$ kubectl获取秘密-n齿轮阶段-o yaml --export>   secrets-mumbairegion.yaml

在AWS孟买地区的POC服务器上:

  

$ kubectl create -f ./secrets-mumbairegion.yaml -n cog-stage

$ kubectl get pods  -n cog-stage  

    NAME                                  READY   STATUS                       RESTARTS   AGE
      keeper-68ff7            0/1     CreateContainerConfigError   0          44m
      bus-f954                0/1     CreateContainerConfigError   0          44m
      configservice-7gvg5        0/1     CreateContainerConfigError   0          44m
      fengsh-6fbc6bn8             0/1     CreateContainerConfigError   0          44m

检查此输出的最后一行是否成功还是为什么会出现CreateContainerConfigError:成功提取图像“ gold / keeper:feature

$ kubectl describe  pod keeper-68ff7 -n cog-stage

Events:
  Type     Reason   Age                    From                                                  Message
  ----     ------   ----                   ----                                                  -------
  Warning  Failed   57m (x20 over 62m)     kubelet, ip-172-Xx0-xx.ap-south-1.compute.internal  Error: ImagePullBackOff
  Normal   BackOff  52m (x41 over 62m)     kubelet, ip-172-X-x-XX.ap-south-1.compute.internal  Back-off pulling image "gold/keeper:feature_rouXXX_fXnd_online_status.6662.092"
  Normal   Pulling  7m14s (x175 over 62m)  kubelet, ip-172-xx-xx-xx.ap-south-1.compute.internal  pulling image "gold/keeper:feature_roul_fXnd_online_status.XXX2960"
  Normal   Pulled   2m15s (x188 over 50m)  kubelet, ip-172-XX-xx-Xx.ap-south-1.compute.internal  Successfully pulled image "gold/keeper:feature_roul_frXnd_online_status.XXX0"

1 个答案:

答案 0 :(得分:1)

此问题通过迁移ConfigMap来解决

#kubectl create -f ./ConfigMap.yaml -n cog-stage