gcloud:用户无权访问服务帐户“默认"; [英] gcloud: The user does not have access to service account "default"
本文介绍了gcloud:用户无权访问服务帐户“默认";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试使用已激活的服务帐户来创建和删除 gcloud 容器集群(k8s 集群),使用以下命令:
I attempting to use an activated service account scoped to create and delete gcloud container clusters (k8s clusters), using the following commands:
gcloud config configurations create my-svc-account
--no-activate
--project myProject
gcloud auth activate-service-account my-svc-account@my-project.iam.gserviceaccount.com
--key-file=/path/to/keyfile.json
--configuration my-svc-account
gcloud container clusters create a-new-cluster
--configuration my-svc-account
--project= my-project
--zone "my-zone"
我总是收到错误:
...ERROR: (gcloud.container.clusters.create) ResponseError: code=400, message=The user does not have access to service account "default".
如何授予 my-svc-account 访问 GKE 的默认服务帐号的权限?
How do I grant my-svc-account access to the default service account for GKE?
推荐答案
在与 Google 支持人员交谈后,问题是服务帐户没有激活服务帐户用户"权限.添加服务帐户用户"可解决此错误.
After talking to Google Support, the issue was that the service account did not have a "Service Account User" permissions activated. Adding "Service Account User" resolves this error.
这篇关于gcloud:用户无权访问服务帐户“默认";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文