如何使用“help repo add”添加工件注册表?

问题描述 投票:0回答:1

使用

gcloud
(似乎在 Docker 配置中存储凭据)向 GCP 进行身份验证后,我可以将 Helm 图表推送到我的 Artifact 注册表:

$ helm push my-appl-1.0.0.tgz oci://us-west1-docker.pkg.dev/my-gcp-project/docker-testing/charts
Pushed: us-west1-docker.pkg.dev/my-gcp-project/docker-testing/charts/my-appl:1.0.0
Digest: sha256:321ac1f93e52fc741e81c03a8509255fc34275ac52edb7a3677a459f6f80a6cd

但是,我无法让

helm repo add
工作。我试过这个:

$ helm repo add gcp-ar https://us-west1-docker.pkg.dev/my-gcp-project/docker-testing
Error: looks like "https://us-west1-docker.pkg.dev/my-gcp-project/docker-testing" is not a valid chart repository or cannot be reached: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type repo.IndexFile

我也尝试过这些,但结果相同:

helm repo add gcp-ar oci://us-west1-docker.pkg.dev/my-gcp-project/docker-testing
helm repo add gcp-ar oci://us-west1-docker.pkg.dev/my-gcp-project/docker-testing/charts
helm repo add gcp-ar https://us-west1-docker.pkg.dev/my-gcp-project/docker-testing/charts

如何使用“helm repo add”在本地注册 Artifact Registry Helm 存储库?

kubernetes-helm google-artifact-registry
1个回答
0
投票

您不需要将 OCI registry 添加到传统 Helm repos。这只是两种不同类型的索引存储。 OCI 注册表来自 Docker 世界,可使用简单的

helm registry login
helm push oci://
命令。

© www.soinside.com 2019 - 2024. All rights reserved.