【问题标题】:Error: failed to download "kubernetes-dashboard" (hint: running `helm repo update` may help)错误:无法下载“kubernetes-dashboard”(提示:运行 `helm repo update` 可能会有所帮助)
【发布时间】:2020-07-11 13:07:23
【问题描述】:

我在 docs 之后使用 helm 3 安装 Kubernetes 仪表板,但出现以下错误:

  [root@localhost ~]# helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
    [root@localhost ~]# helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "kubernetes-dashboard" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈ Happy Helming!⎈ 
    [root@localhost ~]# helm install kubernetes-dashboard/kubernetes-dashboard kubernetes-dashboard
Error: failed to download "kubernetes-dashboard" (hint: running `helm repo update` may help)

我应该怎么做才能解决这个问题?

【问题讨论】:

    标签: kubernetes


    【解决方案1】:

    该图表是旧的,并安装了 1.x 版本的 kubernetes 仪表板。

    来自文档here 使用以下命令安装最新的 Kubernetes 仪表板版本 2.x

    helm repo add k8s-dashboard https://kubernetes.github.io/dashboard
    helm repo update
    helm install dashboard-release k8s-dashboard/kubernetes-dashboard --version 2.2.0
    

    【讨论】:

    • 我只是不知道为什么使用这个命令[root@localhost ~]# helm install k8s-dashboard/kubernetes-dashboard kubernetes-dashboard --version 2.2.0 Error: failed to download "kubernetes-dashboard" (hint: running helm repo update`可能会有所帮助)`失败了,这个helm install k8s-dashboard/kubernetes-dashboard --generate-name --version 2.2.0成功,我不能按名字使用kubernetes-dashboard?@Arghya Sadhu
    • 名称必须是图表之前的第一个参数..检查更新的答案
    • 我明白了,我把名字写错了。@Arghya Sadhu 谢谢你的耐心。
    【解决方案2】:

    Arghya提到的图表是这个时期的必备。

    除了他的回答,我想提一下关于 Helm 版本的自定义值的非常重要的信息:

    #these are mine
    rbac:
      clusterReadOnlyRole: true # <--- YOU NEED this one
      clusterAdminRole: false
    extraArgs:
      - --enable-skip-login
      - --enable-insecure-login
      - --system-banner="Welcome to Company.com Kubernetes Cluster"
    

    如您所见,rbac.enabled 还不够,您还需要指定 rbac.clusterReadOnlyRole=true 或授予对仪表板的更多访问权限,请将 rbac.clusterAdminRole 设置为 true。

    【讨论】:

      猜你喜欢
      • 2021-02-12
      • 2020-07-19
      • 1970-01-01
      • 2021-11-21
      • 2011-11-17
      • 2019-09-22
      • 2019-11-10
      • 1970-01-01
      • 2021-11-29
      相关资源
      最近更新 更多