You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

GKE集群中用户所属Kubernetes组显示异常问题咨询

GKE集群中用户所属Kubernetes组显示异常问题咨询

大家好,我碰到个有点搞不懂的问题来请教下!本来想看看自己在Kubernetes里的身份组,执行了这个命令:

kubectl auth whoami

结果只显示我属于system:authenticated组,这信息也太模糊了吧?我可是亲手创建的这个GKE集群啊,按说应该属于system:masters组才对,有没有大佬知道这是为啥?

先给大家看下我创建集群用的Terraform配置:

resource "google_container_cluster" "test" {
  name = "test"
  location = "europe-central2-a"
  remove_default_node_pool = true
  initial_node_count = 1
  network = google_compute_network.test.self_link
  subnetwork = google_compute_subnetwork.test.self_link
  ip_allocation_policy {}
}

resource "google_container_node_pool" "test" {
  name = "test"
  cluster = google_container_cluster.test.id
  location = google_container_cluster.test.location
  initial_node_count = 1
}

另外我特意测试了自己的权限:

kubectl auth can-i * * --all-namespaces

返回的是yes,说明我确实有集群的所有权限,但就是身份组这块显示不对,实在搞不懂哪里出问题了。

备注:内容来源于stack exchange,提问作者x-yuri

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.17 08:53:16