为 kubelet 添加一个额外的参数 // 这样 kubelet 就不会在启动 pod 的时候去墙外的 k8s 仓库拉取 pause-amd64:3.0 镜像了
KUBELET_POD_INFRA_CONTAINER="--pod-infra-container-image=registry.access.redhat.com/rhel7/pod-infrastructure:latest" http://registry.access.redhat.com/rhel7/pod-infrastructure:latest%22
或者
1. 首先把加速器地址改为阿里云的
- vim /etc/docker/daemon.json
- "registry-mirrors": ["http://xnfwm35f.mirror.aliyuncs.com/"]
- systemctl restart docker
2. 在宿主机节点上拉取谷歌镜像, 由于不能 ×××, 这里从阿里云拉取.
- docker pull http://registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64 :3.0
- KUBELET_ARGS="--pod-infra-container-image={私有仓库地址}/pause:3.0"
来源: http://www.bubuko.com/infodetail-2622110.html