K8S kubelet 修改 pause 默认镜像仓库
因为 k8s.gcr.io 无法访问,所以使用阿里云的镜像源代替
# 查看 kubelet 配置
systemctl status -l kubelet
cd /var/lib/kubelet/
cp kubeadm-flags.env kubeadm-flags.env.ori
# 把 k8s.gcr.io/pause:3.1 改成 registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.1
cat /var/lib/kubelet/kubeadm-flags.env
KUBELET_KUBEADM_ARGS="--cgroup-driver=systemd --network-plugin=cni --pod-infra-container-image=registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.1"
# 重启 kubelet 服务
systemctl daemon-reload
systemctl restart kubelet