kubernetes - Helm 在不同的存储库中查找,然后是我使用 --repo 标志指定的存储库
问题描述
如果我执行以下命令,它会查看“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
解决方案
我解决了它-我在命令中添加了“--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
在此之后所有工作!
推荐阅读
- mysql - 无法从 docker 连接 MYSQL
- python - 使用python将私钥(字符串)转换为DER格式
- r - 对日期使用“小于”运算符
- python - 无法从添加到 python 类的方法访问属性
- java - 如何更正带注释的 websocket 类的路径?
- c++ - #define 类外宏
- terraform - 刷新状态时出错:S3 中的状态数据没有预期的内容
- javascript - 从javascript函数触发表单的动作属性
- jquery-ui - 图层后面的 jQuery UI 对话框被禁用且不可点击
- javascript - 需要帮助调试 CRM Web 资源代码 - 收到错误消息“Web 资源方法不存在”