运维开发网

docker已证书方式访问harbor

运维开发网 https://www.qedev.com 2020-06-21 17:02 出处:网络 作者:运维开发网整理
镜像仓库地址: harbor.live.com   首先导入一个镜像 docker load -i nginx-ingress-controller.tar 1.# 登陆到docker机器,创建 /etc/docker/certs.d/harbor.live.com 目录,并把将harbor证书的CA证书,从master复制进去 ssh 10.0.0.6 ‘sudo mkdir -p /etc/d

镜像仓库地址: harbor.live.com

 

首先导入一个镜像

docker load -i nginx-ingress-controller.tar

1.# 登陆到docker机器,创建 /etc/docker/certs.d/harbor.live.com 目录,并把将harbor证书的CA证书,从master复制进去

ssh 10.0.0.6 ‘sudo mkdir -p /etc/docker/certs.d/harbor.live.com/;sudo chown k8s.k8s /etc/docker/certs.d/harbor.live.com/‘

scp /etc/kubernetes/cert/ca.pem 10.0.0.6:/etc/docker/certs.d/harbor.live.com/

2.登陆认证

docker login harbor.live.com 进行登陆,登陆后,认证文件会写入 ~/.docker/config.json

3.修改镜像的tagsdocker tag registry.cn-hangzhou.aliyuncs.com/google_containers/nginx-ingress-controller:0.23.0 harbor.live.com/public/nginx-ingress-controller:0.23.04.上传镜像docker push harbor.live.com/public/nginx-ingress-controller:0.23.0

0

精彩评论

暂无评论...
验证码 换一张
取 消