【问题标题】:helm install failing on GKE [duplicate]GKE上的helm安装失败[重复]
【发布时间】:2019-12-01 00:36:08
【问题描述】:

我是 GCP 新手 - 刚刚创建了一个新帐户。
我已经安装了一个 GKE 集群 - 它处于活动状态,还下载了 sdk。 我能够使用 kubectl 在 GKE 上部署一个 pod。
安装了 tiller 和 helm 客户端。
当我尝试运行 helm 命令时从 CLI

>helm install --name testngn ./nginx-test


 Error: release testngn failed: namespaces "default" is forbidden: User  
"system:serviceaccount:kube-system:default" cannot get resource "namespaces" in API group "" in the namespace "default"

我已赋予我的用户“所有者”角色 - 所以希望这不是问题。但不确定 CLI 如何识别用户和权限(对我来说是新的)。 kubectl -n 标志也不适用于 helm (?)

【问题讨论】:

标签: google-cloud-platform google-kubernetes-engine kubernetes-helm


【解决方案1】:

大多数文档只是说只是做helm init - 但它没有为 Tiller 提供任何权限 - 所以它会失败 - 无法执行任何东西。
Create Service account with cluster-admin role 使用 rbac-config.yaml。 然后用这个服务账号 helm init 为 Tiller 提供权限

$ kubectl create -f rbac-config.yaml
服务帐户“tiller”已创建
创建集群角色绑定“分蘖”
$ helm init --service-account 分蘖

【讨论】:

    猜你喜欢
    • 2022-06-17
    • 2019-12-12
    • 2019-01-16
    • 2021-02-02
    • 2021-05-07
    • 2020-12-08
    • 2020-04-23
    • 2019-03-23
    • 1970-01-01
    相关资源
    最近更新 更多