k8s 拉取私有仓库的镜像时出错

2020-10-09 15:12:35 +08:00
 bfqymmt
环境:rancher + k8s + harbor

出错内容为:
Failed to pull image "X.X.X.X/public/XXXX": rpc error: code = Unknown desc = failed to pull and unpack image "X.X.X.X/public/XXXX:latest": failed to resolve reference "X.X.X.X/public/XXXX:latest": failed to do request: Head https://X.X.X.X/public/XXXX/manifests/latest: dial tcp X.X.X.X:443: connect: connection refused

已设置:
harbor 中已改为 http 模式。

在 k8s 中,使用命令行模式:docker pull X.X.X.X/public/XXXX,这样可以从 harbor 拉取镜像,但是在 k8s 中不行。

问题:k8s 拉取私有仓库的镜像如何才能成功?
4353 次点击
所在节点    Kubernetes
3 条回复
joesonw
2020-10-09 15:14:28 +08:00
ixx
2020-10-09 16:12:24 +08:00
私库支持 https 吗
index90
2020-10-09 16:35:48 +08:00
https://kiwenlau.com/note/2018/07/06/docker-memory/

在 k8s 节点上,配置 insecure-registries,重启 docker 。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/713336

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX