kubeadm init失败

失败1

kubeadm init --apiserver-advertise-address=192.168.5.3 \
              --image-repository registry.aliyuncs.com/google_containers \
              --kubernetes-version v1.21.1 \ 
              --service-cidr=10.96.0.0/12  \
              --pod-network-cidr=10.244.0.0/16

期待即将成功的我,结果:

[ERROR ImagePull]: failed to pull image registry.aliyuncs.com/google_containers/coredns:v1.8.0: output: Error response from daemon: manifest for registry.aliyuncs.com/google_containers/coredns:v1.8.0 not found: manifest unknown: manifest unknown
, error: exit status 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher

行,那我就先:

kubeadm config images pull --image-repository registry.aliyuncs.com/google_containers
//记得指定镜像源地址

一开始也是啦啦啦,拉去几个成功,正当我战术后仰时候:

failed to pull image "registry.aliyuncs.com/google_containers/coredns:v1.8.0": output: Error response from daemon: manifest for registry.aliyuncs.com/google_containers/coredns:v1.8.0 not found: manifest unknown: manifest unknown
, error: exit status 1

o(︶︿︶)o,行,那我就单独拉你。

## 手动拉取coredns镜像并打标签
docker pull coredns/coredns:1.8.0

## 打标签时记得要跟上面not found的那个保持一致
docker tag coredns/coredns:1.8.0 registry.aliyuncs.com/google_containers/coredns:v1.8.0

再次

kubeadm init --apiserver-advertise-address=192.168.5.3 \
              --image-repository registry.aliyuncs.com/google_containers \
              --kubernetes-version v1.21.1 \ 
              --service-cidr=10.96.0.0/12  \
              --pod-network-cidr=10.244.0.0/16

就成功了,可以继续了(_)v

Logo

开源、云原生的融合云平台

更多推荐