我已经在树莓派集群上安装了 k3s。
pi@pikey:~ $ sudo kubectl get node
NAME STATUS ROLES AGE VERSION
pikey Ready master 4d23h v1.14.6-k3s.1
pinode-1 Ready worker 4d23h v1.14.6-k3s.1
pinode-2 Ready worker 4d23h v1.14.6-k3s.1
pinode-3 Ready worker 4d23h v1.14.6-k3s.1
我最初只在本地主机(pikey)上工作。
我有一个 docker 图像,我标记并推送到 crictl
pi@pikey:~ $ sudo crictl pull localhost:5000/pilab/node-intro-img
Image is up to date for sha256:7a2c45e77748e6b2282210d7d54b12f0cb25c4b224c222149d7a66653512f543
pi@pikey:~ $ sudo kubectl delete deployment node-intro
deployment.extensions "node-intro" deleted
pi@pikey:~ $ sudo crictl images
IMAGE TAG IMAGE ID SIZE
docker.io/coredns/coredns 1.3.0 6d816a3a1d703 11.5MB
docker.io/library/traefik 1.7.12 a0fc65eddfcc8 19.1MB
docker.io/rancher/klipper-helm v0.1.5 d4a37f6d19104 25.4MB
docker.io/rancher/klipper-lb v0.1.1 36563d1beb5e2 2.58MB
k8s.gcr.io/pause 3.1 e11a8cbeda868 224kB
localhost:5000/pilab/node-intro-img latest 7a2c45e77748e 320MB
现在,如果我尝试部署
sudo kubectl create deployment node-intro --image=localhost:5000/pilab/node-intro-img
我明白了
pi@pikey:~ $ sudo kubectl get pods
NAME READY STATUS RESTARTS AGE
node-intro-567c59c8c7-9p5c5 0/1 ImagePullBackOff 0 101s
pi@pikey:~ $ sudo kubectl get pods
NAME READY STATUS RESTARTS AGE
node-intro-567c59c8c7-9p5c5 0/1 ErrImagePull 0 104s
如果crictl可以拉取镜像,为什么k3s部署失败?