无法更改服务帐户用户GCLOUD GCP
我仍然想知道应该如何更改服务帐户用户。假设我有2个服务帐户(A和B),每个用户在不同的项目中都具有不同的作用。完成使用用户B后,当我想更改到服务帐户A并访问资源时,GCLOUD命令说
Error from server (Forbidden): pods is forbidden: User "[email protected]" cannot list resource "pods" in API group "" in the namespace "default": requires one of ["container.pods.list"] permission(s).
我已经完成了使用gcloud config set actif [service-account]
更改我的服务帐户用户。 ,但是GCLOUD仍然读取另一个服务帐户。我错过了什么吗?
I still wondering how supposed to do to change the service account user. Let say I have 2 service account (A and B), which each user has different role in different project. After done being use user B, when I want to change to service account A and access the resource, gcloud command says
Error from server (Forbidden): pods is forbidden: User "[email protected]" cannot list resource "pods" in API group "" in the namespace "default": requires one of ["container.pods.list"] permission(s).
I'm done change my service account user with gcloud config set account [service-account]
, but the gcloud still read another service account. Did I missed something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是我认为您在做什么的一个人为的例子:
一个解决方案是授予GCP(!!)服务帐户 kubernetes发动机角色有权列出pods,即
container.pods。 *
是角色/container.developer
的一部分:Here's a contrived example of what I think you're doing:
One solution is to grant the GCP (!) Service Account one of the Kubernetes Engine roles that has permission to list Pods, i.e.
container.pods.*
which is part ofroles/container.developer
: