kubeadm init 时从本地私有仓库下载镜像
#kubeadm init 时从本地私有仓库下载镜像
images=(
gcr.io/google_containers/kube-proxy-amd64:v1.6.1
gcr.io/google_containers/kube-apiserver-amd64:v1.6.1
gcr.io/google_containers/kube-scheduler-amd64:v1.6.1
gcr.io/google_containers/kube-controller-manager-amd64:v1.6.1
gcr.io/google_containers/kube-proxy-amd64:v1.6.0
gcr.io/google_containers/kube-controller-manager-amd64:v1.6.0
gcr.io/google_containers/kube-apiserver-amd64:v1.6.0
gcr.io/google_containers/kube-scheduler-amd64:v1.6.0
gcr.io/google_containers/kubernetes-dashboard-amd64:v1.6.0
gcr.io/google_containers/k8s-dns-sidecar-amd64:1.14.1
gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.1
gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64:1.14.1
gcr.io/google_containers/etcd-amd64:3.0.17
quay.io/coreos/flannel:v0.7.0-amd64
gcr.io/google_containers/pause-amd64:3.0
)
for imageName in ${images[@]} ; do
docker pull gcr.io/google_containers/$imageName;
docker tag gcr.io/google_containers/$imageName docker.cinyi.com:443/senyint/$imageName;
docker push docker.cinyi.com:443/senyint/$imageName;
done
vim /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
为kubelet添加一个额外的参数 // 这样kubelet就不会在启动pod的时候去墙外的k8s仓库拉取pause-amd64:3.0镜像了
--pod-infra-container-image=docker.cinyi.com:443/senyint/pause-amd64:3.0
Environment="KUBELET_INFRA_IMAGE=--pod-infra-container-image=docker.cinyi.com:443/senyint/pause-amd64:3.0"