然后我们执行docker pull
[root@k8s-master ~]# docker pull 192.168.124.43:8002/rancher/nginx-ingress-controller-defaultbackend:1.4 1.4: Pulling from rancher/nginx-ingress-controller-defaultbackend 5990baa43a5e: Pull complete Digest: sha256:f63ced70bc85ca753e715c93b0adc3115510a6575129102383236c30112379e5 Status: Downloaded newer image for 192.168.124.43:8002/rancher/nginx-ingress-controller-defaultbackend:1.4 [root@k8s-master ~]#注意pull的时候要带上版本的tag
以上,我们从一台服务器(192.168.122.65)推送镜像到私服,然后用另一台服务器拉取(192.168.124.59).需要注意的是,由于服务端使用了自已生成的https证书,因此docker镜像生产端和消费端都要添加ca证书信任