如果我執行以下命令,它會在“https://github.com/grafana/”而不是我指定的“https://grafana.github.io/helm-charts”中查找
這是我運行的內容和結果:
helm3 upgrade --install grafana grafana --dry-run --repo https://grafana.github.io/helm-charts --wait
Release "grafana" does not exist. Installing it now.
Error: failed to download "https://github.com/grafana/helm-charts/releases/download/grafana-6.16.14/grafana-6.16.14.tgz"
為什么它在“github.com/grafana”中查找,而不是我告訴它使用 repo 標志查找的位置 - “grafana.github.io”?
我的同事運行相同的命令并且它有效。我列出了存盤庫,但 grafana 不在那里,所以我認為這會迫使它起作用?
helm3 repo list
NAME URL
stable https://charts.helm.sh/stable
local http://127.0.0.1:8879/charts
eks https://aws.github.io/eks-charts
bitnami https://charts.bitnami.com/bitnami
cluster-autoscaler https://kubernetes.github.io/autoscaler
kube-dns-autoscaler https://kubernetes-sigs.github.io/cluster-proportional-autoscaler
cluster-proportional-autoscaler https://kubernetes-sigs.github.io/cluster-proportional-autoscaler
external-dns https://charts.bitnami.com/bitnami
kube2iam https://jtblin.github.io/kube2iam/
kubernetes-dashboard https://kubernetes.github.io/dashboard/
incubator https://charts.helm.sh/incubator
我的同事有與上面相同的 repo 串列輸出。
下面的命令將在我的系統中作業,但是我想知道為什么當我在上面的示例中使用 --repo 標志時它不起作用(我們所有的代碼都包含該標志并且他們不想更改它) :
helm3 repo add grafana https://grafana.github.io/helm-charts
"grafana" has been added to your repositories
kconfig_et helm3 upgrade --install grafana grafana/grafana --dry-run --wait
uj5u.com熱心網友回復:
我執行了您的 Helm 命令,但帶有--debug標志以獲取此錯誤:
helm upgrade --install grafana grafana --dry-run --repo https://grafana.github.io/helm-charts --wait --debug
history.go:56: [debug] getting history for release grafana
Release "grafana" does not exist. Installing it now.
install.go:178: [debug] Original chart version: ""
Error: no cached repo found. (try 'helm repo update')
然后我只是helm repo update按照建議執行。然后我重試了相同的helm upgrade命令,它成功安裝了圖表。
您的同事沒有遇到錯誤,因為在某些時候他/她helm repo update至少執行過一次。(我的是一個新安裝的 Helm)
uj5u.com熱心網友回復:
我解決了它 - 我在命令中添加了“--debug”并看到了這個 -
Error: no cached repo found. (try 'helm repo update'): open /Users/mysystem/Library/Caches/helm/repository/local-index.yaml: no such file or directory
我接下來將 .helm 中的那個復制到除錯訊息中的位置 -
cp ~/.helm/repository/local/index.yaml /Users/mysystem/Library/Caches/helm/repository/local-index.yaml
在此之后所有作業!
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/317645.html
