问题描述api
[root@localhost ~]# kubeadm init --kubernetes-version=v1.11.1 --pod-network-cidr=10.244.0.0/16 --service-cidr=10.96.0.0/12spa
在进行k8s集群初始化的时候,报如下错误:3d
[preflight] Some fatal errors occurred:
[ERROR ImagePull]: failed to pull image [k8s.gcr.io/kube-apiserver-amd64:v1.11.1]: exit status 1
[ERROR ImagePull]: failed to pull image [k8s.gcr.io/kube-controller-manager-amd64:v1.11.1]: exit status 1
[ERROR ImagePull]: failed to pull image [k8s.gcr.io/kube-scheduler-amd64:v1.11.1]: exit status 1
[ERROR ImagePull]: failed to pull image [k8s.gcr.io/kube-proxy-amd64:v1.11.1]: exit status 1代理
缘由server
我以前是用别人代理下载的k8s镜像版本是v1.11.1,后面隔了一段时间代理过时,从新安装的了kubeadm,此时的版本是v1.11.2,而我在kubeadm init --kubernetes-version=v1.11.1时版本仍是写着v1.11.1。之后碰到相似的问题,可先查看各组件的版本blog
[root@localhost ~]# kubeadm versionci
解决办法kubernetes
将初始化命令改为:it
[root@localhost ~]# kubeadm init --kubernetes-version=v1.11.2 --pod-network-cidr=10.244.0.0/16 --service-cidr=10.96.0.0/12io
最后初始化成功