K8S创建密钥拉取私服镜像
修改各个Node的/etc/docker/daemon.json[root@testing-master ingress]# cat /etc/docker/daemon.json{"registry-mirrors": ["https://85go7owl.mirror.aliyuncs.com"],"insecure-registries" : ["127.0.0.1:18082"] -- 你
·
[root@testing-master ingress]# cat /etc/docker/daemon.json
{
"registry-mirrors": ["https://85go7owl.mirror.aliyuncs.com"],
"insecure-registries" : ["127.0.0.1:18082"] -- 你自己的仓库
}
systemctl daemon-reload
service docker restart
docker login -u admin -p xxxxx 127.0.0.1:18082(登录docker生成/root/.docker/config.json)
kubectl create secret generic regcred \
--from-file=.dockerconfigjson=/root/.docker/config.json \
--type=kubernetes.io/dockerconfigjson
更多推荐
已为社区贡献6条内容
所有评论(0)