V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
bfqymmt
V2EX  ›  Kubernetes

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

  •  
  •   bfqymmt · 2020-10-09 15:12:35 +08:00 · 4341 次点击
    这是一个创建于 1287 天前的主题,其中的信息可能已经有所发展或是发生改变。
    环境: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 拉取私有仓库的镜像如何才能成功?
    3 条回复    2020-10-09 16:35:48 +08:00
    joesonw
        1
    joesonw  
       2020-10-09 15:14:28 +08:00
    ixx
        2
    ixx  
       2020-10-09 16:12:24 +08:00
    私库支持 https 吗
    index90
        3
    index90  
       2020-10-09 16:35:48 +08:00
    https://kiwenlau.com/note/2018/07/06/docker-memory/

    在 k8s 节点上,配置 insecure-registries,重启 docker 。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5667 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 69ms · UTC 01:53 · PVG 09:53 · LAX 18:53 · JFK 21:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.