Kubernetes(K8s) and Docker notes (1.2)
(5.1) kubeadm config images pullavoid the "unknown manifest" error: pull images from mirrorgcrio, retag them, and finally untag them.$sudo kubeadm config images list |sed -e 's/^/docker pull /g' -e 's
·
(continued)
(5.1) kubeadm config images pull
how to avoid the "[ERROR ImagePull]: failed to pull image ...: manifest unknown" error:
Solution:
pull images from mirrorgcrio, retag them, and finally untag them.
$sudo kubeadm config images list |sed -e 's/^/docker pull /g' -e 's#k8s.gcr.io#mirrorgcrio#g' | sudo sh -x
$sudo docker images | grep mirrorgcrio | awk '{print "docker tag ",$1":"$2,$1":"$2}' | sed -e 's#mirrorgcrio#k8s.gcr.io#2' | sudo sh -x
$sudo docker images | grep mirrorgcrio | awk '{print "docker rmi ", $1":"$2}' | sudo sh -x
(19:33 dabs@CNU1343VF8 ~) > sudo kubeadm config images list |sed -e 's/^/docker pull /g' -e 's#k8s.gcr.io#mirrorgcrio#g' | sudo sh -x
W0528 19:33:31.527356 83892 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
+ docker pull mirrorgcrio/kube-apiserver:v1.18.3
v1.18.3: Pulling from mirrorgcrio/kube-apiserver
83b4483280e5: Pull complete
2bfb66b13a96: Pull complete
Digest: sha256:b5bf4650d7f084d0c9f89ecae50c00ebf5b44edcdd487636d8c7fd400d27cd05
Status: Downloaded newer image for mirrorgcrio/kube-apiserver:v1.18.3
docker.io/mirrorgcrio/kube-apiserver:v1.18.3
+ docker pull mirrorgcrio/kube-controller-manager:v1.18.3
v1.18.3: Pulling from mirrorgcrio/kube-controller-manager
83b4483280e5: Already exists
7a73c2c3b85e: Pull complete
Digest: sha256:168e8f9276e5f947d68f93a9463243f6a525227d15f55fb40b427c8d6caa55c2
Status: Downloaded newer image for mirrorgcrio/kube-controller-manager:v1.18.3
docker.io/mirrorgcrio/kube-controller-manager:v1.18.3
+ docker pull mirrorgcrio/kube-scheduler:v1.18.3
v1.18.3: Pulling from mirrorgcrio/kube-scheduler
83b4483280e5: Already exists
133c4d2f432a: Pull complete
Digest: sha256:a29ce6508b4259dbaf8fc5a46ac4a2cf112fbe2b73f3270c88eeaa848d58ba66
Status: Downloaded newer image for mirrorgcrio/kube-scheduler:v1.18.3
docker.io/mirrorgcrio/kube-scheduler:v1.18.3
+ docker pull mirrorgcrio/kube-proxy:v1.18.3
v1.18.3: Pulling from mirrorgcrio/kube-proxy
83b4483280e5: Already exists
cedd2715c2e4: Pull complete
297e97c9c472: Pull complete
67b649411e75: Pull complete
d97928a1765f: Pull complete
ffa39a529ef3: Pull complete
16d39f790155: Pull complete
Digest: sha256:83d42f2ac5e87529792c3bb1a0e606d5d04cfca03cc43d2ab6003e4132d47adb
Status: Downloaded newer image for mirrorgcrio/kube-proxy:v1.18.3
docker.io/mirrorgcrio/kube-proxy:v1.18.3
+ docker pull mirrorgcrio/pause:3.2
3.2: Pulling from mirrorgcrio/pause
c74f8866df09: Pull complete
Digest: sha256:4a1c4b21597c1b4415bdbecb28a3296c6b5e23ca4f9feeb599860a1dac6a0108
Status: Downloaded newer image for mirrorgcrio/pause:3.2
docker.io/mirrorgcrio/pause:3.2
+ docker pull mirrorgcrio/etcd:3.4.3-0
3.4.3-0: Pulling from mirrorgcrio/etcd
39fafc05754f: Pull complete
3736e1e115b8: Pull complete
79de61f59f2e: Pull complete
Digest: sha256:4198ba6f82f642dfd18ecf840ee37afb9df4b596f06eef20e44d0aec4ea27216
Status: Downloaded newer image for mirrorgcrio/etcd:3.4.3-0
docker.io/mirrorgcrio/etcd:3.4.3-0
+ docker pull mirrorgcrio/coredns:1.6.7
1.6.7: Pulling from mirrorgcrio/coredns
c6568d217a00: Pull complete
ff0415ad7f19: Pull complete
Digest: sha256:695a5e109604331f843d2c435f488bf3f239a88aec49112d452c1cbf87e88405
Status: Downloaded newer image for mirrorgcrio/coredns:1.6.7
docker.io/mirrorgcrio/coredns:1.6.7
(19:39 dabs@CNU1343VF8 ~) > sudo docker images | grep mirrorgcrio | awk '{print "docker tag ",$1":"$2,$1":"$2}' | sed -e 's#mirrorgcrio#k8s.gcr.io#2' | sudo sh -x
+ docker tag mirrorgcrio/kube-proxy:v1.18.3 k8s.gcr.io/kube-proxy:v1.18.3
+ docker tag mirrorgcrio/kube-apiserver:v1.18.3 k8s.gcr.io/kube-apiserver:v1.18.3
+ docker tag mirrorgcrio/kube-controller-manager:v1.18.3 k8s.gcr.io/kube-controller-manager:v1.18.3
+ docker tag mirrorgcrio/kube-scheduler:v1.18.3 k8s.gcr.io/kube-scheduler:v1.18.3
+ docker tag mirrorgcrio/pause:3.2 k8s.gcr.io/pause:3.2
+ docker tag mirrorgcrio/coredns:1.6.7 k8s.gcr.io/coredns:1.6.7
+ docker tag mirrorgcrio/etcd:3.4.3-0 k8s.gcr.io/etcd:3.4.3-0
(19:39 dabs@CNU1343VF8 ~) > sudo docker images | grep mirrorgcrio | awk '{print "docker rmi ", $1":"$2}' | sudo sh -x
+ docker rmi mirrorgcrio/kube-proxy:v1.18.3
Untagged: mirrorgcrio/kube-proxy:v1.18.3
Untagged: mirrorgcrio/kube-proxy@sha256:83d42f2ac5e87529792c3bb1a0e606d5d04cfca03cc43d2ab6003e4132d47adb
+ docker rmi mirrorgcrio/kube-apiserver:v1.18.3
Untagged: mirrorgcrio/kube-apiserver:v1.18.3
Untagged: mirrorgcrio/kube-apiserver@sha256:b5bf4650d7f084d0c9f89ecae50c00ebf5b44edcdd487636d8c7fd400d27cd05
+ docker rmi mirrorgcrio/kube-controller-manager:v1.18.3
Untagged: mirrorgcrio/kube-controller-manager:v1.18.3
Untagged: mirrorgcrio/kube-controller-manager@sha256:168e8f9276e5f947d68f93a9463243f6a525227d15f55fb40b427c8d6caa55c2
+ docker rmi mirrorgcrio/kube-scheduler:v1.18.3
Untagged: mirrorgcrio/kube-scheduler:v1.18.3
Untagged: mirrorgcrio/kube-scheduler@sha256:a29ce6508b4259dbaf8fc5a46ac4a2cf112fbe2b73f3270c88eeaa848d58ba66
+ docker rmi mirrorgcrio/pause:3.2
Untagged: mirrorgcrio/pause:3.2
Untagged: mirrorgcrio/pause@sha256:4a1c4b21597c1b4415bdbecb28a3296c6b5e23ca4f9feeb599860a1dac6a0108
+ docker rmi mirrorgcrio/coredns:1.6.7
Untagged: mirrorgcrio/coredns:1.6.7
Untagged: mirrorgcrio/coredns@sha256:695a5e109604331f843d2c435f488bf3f239a88aec49112d452c1cbf87e88405
+ docker rmi mirrorgcrio/etcd:3.4.3-0
Untagged: mirrorgcrio/etcd:3.4.3-0
Untagged: mirrorgcrio/etcd@sha256:4198ba6f82f642dfd18ecf840ee37afb9df4b596f06eef20e44d0aec4ea27216
(5,2) how to 'kubeadm reset'?
(21:23 dabs@CNU1343VF8 ~) > sudo kubeadm reset
(21:25 dabs@CNU1343VF8 ~) > sudo rm -rf /etc/cni/net.d
(21:25 dabs@CNU1343VF8 ~) > sudo rm -rf .kube/
(to be continued)
更多推荐
已为社区贡献2条内容
所有评论(0)