在k8s集群的使用过程中,初学者可能会碰到这样的(怪异)问题:
在一个k8s集群里,部署服务(用的私有镜像仓库,如harbor)的时候,只有个别node的服务是部署成功的,其他都是部署失败的,错误的原因就是镜像拉取失败,如下:
kubectl get pods -A -owide |grep jenkins-demo
devlopment jenkins-demo-67d4f9d666-2fh8k 1/1 Running 0 27m 10.244.2.40 local-k8s-nd02 <none> <none>
devlopment jenkins-demo-dbc9f5b6b-h78tx 0/1 ImagePullBackOff 0 6m4s 10.244.6.93 local-k8s-nd03 <none> <none>
production jenkins-demo-dbc9f5b6b-tnkfs 1/1 Running 0 5m47s 10.244.2.44 local-k8s-nd02 <none> <none>
qatest jenkins-demo-67d4f9d666-hb22t 1/1 Running 0 27m 10.244.2.41 local-k8s-nd02 <none> <none>
qatest jenkins-demo-dbc9f5b6b-d6