美文网首页
containerd配置私有harbor镜像仓库

containerd配置私有harbor镜像仓库

作者: 87d6dc4b11a7 | 来源:发表于2024-08-08 09:02 被阅读0次
root@shawn-virtual-machine:/etc/containerd# crictl -version
crictl version v1.24.0

containerd拉取私有仓库镜像报错 x509: certificate signed by unknown authority

在配置文件/etc/containerd/config.toml中增加以下配置

[plugins."io.containerd.grpc.v1.cri".registry]
      config_path = ""

      [plugins."io.containerd.grpc.v1.cri".registry.auths]

      [plugins."io.containerd.grpc.v1.cri".registry.configs]
        # 内部私有仓库认证信息
        [plugins."io.containerd.grpc.v1.cri".registry.configs."10.4.xx.xx:5443".tls]
            insecure_skip_verify = true
        [plugins."io.containerd.grpc.v1.cri".registry.configs."10.4.xx.xx:5443".auth]
            username = "admin" # 在harbor里单独创建的用户,授权访问指定项目
            password = "password"

      [plugins."io.containerd.grpc.v1.cri".registry.headers]

      [plugins."io.containerd.grpc.v1.cri".registry.mirrors]
        # 内部私有仓库配置
        [plugins."io.containerd.grpc.v1.cri".registry.mirrors."10.4.xx.xx:5443"]
            endpoint = ["https://10.4.xx.xx:5443/"]

重启containerd服务以使配置生效

#重新加载配置
systemctl daemon-reload
#重启containerd
systemctl restart containerd

仍拉取失败,报如下错误。

failed to unpack image on snapshotter overlayfs: unexpected media type text/html for sha256:fe29cb63644f0d85a0e8abd7c494c1a350d652a0f2962fbf1b12102ac6cf75b6: not found

参考https://github.com/containerd/containerd/issues/6984endpointhttps://10.4.xx.xx:5443/改为https://10.4.xx.xx:5443
测试pull成功。

https://github.com/containerd/containerd/

相关文章

  • rancher 2.X 搭建小型web集群+mysql主从复制

    阅读目录(Content) 一,环境配置 二,配置harbor私有仓库 三,配置私有镜像 四,push镜像到har...

  • Docker搭建私有仓库之Harbor

    Docker搭建私有仓库之Harbor Harbor Harbor是构建企业级私有docker镜像的仓库的开源解决...

  • MySQL集群 、 负载均衡及高可用

    部署企业私有镜像仓库Harbor 华为云购买云主机,准备环境如下 主机名称IP地址角色配置harbor192.16...

  • Harbor镜像删除回收

    Harbor镜像删除回收 问题原因 Harbor私有仓库运行一段时间后,仓库中存有大量镜像,会占用太多的存储空间。...

  • Harbor镜像删除空间回收

    Harbor镜像删除空间回收 Harbor私有仓库运行一段时间后,仓库中存有大量镜像,会占用太多的存储空间。直接通...

  • harbor

    使用idea中的maven插件上传镜像到harbor私有仓库,如何设置?

  • Harbor构建私有仓库环境部署实践

    Harbor构建私有仓库环境部署实践 最近项目需要用到Harbor镜像仓库需求,花了一些时间去研究这个产品,适...

  • docker

    docker 私有仓库 下载镜像registrydocker pull registry 配置私有仓库(/etc/...

  • Docker 镜像仓库安装

    Docker镜像仓库比较多,通用的有github、harbor等,这里我们安装私有的简单仓库 registry,主...

  • 搭建harbor私有镜像仓库(一)

    搭建harbor私有镜像仓库(一) 背景: 最近接收到新任务 需要在公司内部部署一个harbor仓库 我这里介绍的...

网友评论

      本文标题:containerd配置私有harbor镜像仓库

      本文链接:https://www.haomeiwen.com/subject/hswqkjtx.html