V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
HexHub
HexHub,一站式SSH、Docker、数据库连接管理工具,支持多种主流数据库、多窗口分屏、智能SQL编辑、极速数据处理、批量命令、云端同步,支持SSH跳板机、命令广播、历史命令、SFTP多端文件互传。
Promoted by xiwh
bfqymmt
V2EX  ›  Kubernetes

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

  •  
  •   bfqymmt · 2020-10-09 15:12:35 +08:00 · 4765 次点击
    这是一个创建于 1729 天前的主题,其中的信息可能已经有所发展或是发生改变。
    环境: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   ·   实用小工具   ·   5195 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 07:47 · PVG 15:47 · LAX 00:47 · JFK 03:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.