`
sillycat
  • 浏览: 2486669 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Rancher and k8s 2019(5)Private Registry

 
阅读更多
Rancher and k8s 2019(5)Private Registry

Check Docker Configuration
> cat /etc/docker/daemon.json
{
"insecure-registries": [
"192.168.56.110:8088",
"192.168.56.111:8088",
"192.168.56.112:8088",
"rancher-worker1:8088",
"rancher-worker2:8088",
"rancher-home:8088"
]
}

Restart Docker service
> sudo systemctl restart docker.service

Prepare the nginx image
> docker login rancher-home:8088 -u="sillycat" -p=“xxxxxx"
> docker pull nginx:alpine
> docker tag nginx:alpine rancher-home:8088/sillycat/nginx:v1
> docker push rancher-home:8088/sillycat/nginx:v1

Fetch the image
> docker pull rancher-home:8088/sillycat/nginx:v1

Go to Rancher Admin Console
https://rancher-home/p/c-2ldm9:p-p7bv7/registries

[Resources] —> [Add Registry] —>
Name: HarborHA
Address: 192.168.56.110:8088
Username: sillycat
Password: xxxxx

Can not use hostname, need to use IP
> docker login 192.168.56.110:8088 -u="sillycat" -p="xxxxxx"
> docker tag nginx:alpine 192.168.56.110:8088/sillycat/nginx:v1
> docker push 192.168.56.110:8088/sillycat/nginx:v1

Deploy the Workload like this
Image: 192.168.56.110:8088/sillycat/nginx:v1

It worked pretty well.

References:
https://blog.csdn.net/GMingZhou/article/details/94025725
registry
https://github.com/Joxit/docker-registry-ui
https://juejin.im/post/5b0f4364f265da08f215d9e8
https://segmentfault.com/a/1190000015108428
https://joxit.dev/docker-registry-ui/




分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics