首页 > 解决方案 > 使用 GCR 作为 Helm 存储库

问题描述

是否可以将 Google Container Registry 用作 Helm 存储库?我成功地将图表推送到 GCR,但是当我尝试使用 helm 添加 repo 时,出现错误”

Error: looks like "https://gcr.io/********" is not a valid chart repository or cannot be reached: error converting YAML to JSON: yaml: mapping values are not allowed in this context

这是值得期待的吗?我在做

helm repo add reponame https://gcr.io/***** --username user-name --password *****

标签: google-cloud-platformkubernetes-helm

解决方案


我自己试过这个 - 但它没有用。相反,我发现了这个插件:

https://github.com/hayorov/helm-gcs

这允许您将 GCS 用作 helm 存储库。快速设置/使用:

$ helm plugin install https://github.com/hayorov/helm-gcs.git

# Init a new repository
$ helm gcs init gs://bucket/path

# Add your repository to Helm
$ helm repo add repo-name gs://bucket/path

# Push a chart to your repository
$ helm gcs push chart.tar.gz repo-name

# Update Helm cache
$ helm repo update

# Fetch the chart
$ helm fetch repo-name/chart

# Remove the chart
$ helm gcs rm chart repo-name

推荐阅读