docker搭建了私有仓库,却从谷歌下载镜像的问题???

为kubelet添加一个额外的参数 // 这样kubelet就不会在启动pod的时候去墙外的k8s仓库拉取pause-amd64:3.0镜像了

KUBELET_POD_INFRA_CONTAINER="--pod-infra-container-image=registry.access.redhat.com/rhel7/pod-infrastructure:latest"

或者

1.首先把加速器地址改为阿里云的

vim /etc/docker/daemon.json

"registry-mirrors": ["xnfwm35f.mirror.aliyuncs.com"]

systemctl restart docker

2.在宿主机节点上拉取谷歌镜像,由于不能×××,这里从阿里云拉取。

docker pull  registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0

KUBELET_ARGS="--pod-infra-container-image={私有仓库地址}/pause:3.0"


猜你喜欢

转载自blog.51cto.com/7072753/2121443
今日推荐