首页 > 解决方案 > 来自私有注册表 (Github) 的 Helm 部署映像失败

问题描述

我正在尝试部署已推送到我的 Github 存储库包的图像。为此,我遵循了本指南

当我创建秘密时,在--docker-server=< your-registry-server > 我把ghcr.io

这是我的猫~/.docker/config.json

{
   "auths": {
      "ghcr.io": {},
      "https://index.docker.io/v1/": {}
   },
   "credsStore": "desktop",
   "experimental": "disabled",
   "stackOrchestrator": "swarm"
}

这是 Values.yaml

image:
  repository: ghcr.io/myrepo/nginx-lua
  pullPolicy: IfNotPresent
  # Overrides the image tag whose default is the chart appVersion.
  tag: "1.0.0"

imagePullSecrets:
  - name: regcred
nameOverride: ""
fullnameOverride: ""

部署后,当我看到我的 pod 时出现错误:

Failed to pull image "ghcr.io/myrepo/nginx-lua:1.0.0": rpc error: code = Unknown desc = Error response from daemon: Head https://ghcr.io/v2/myrepo/nginx-lua/manifests/1.0.0: denied: denied

我在这里想念什么?

标签: kubernetesyamlkubernetes-helm

解决方案


推荐阅读