gcloud:用户无权访问服务帐户“默认” [英] gcloud: The user does not have access to service account "default"
本文介绍了gcloud:用户无权访问服务帐户“默认”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试使用激活的服务帐户作用域来创建和删除gcloud容器群集(k8群集),使用以下命令:
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"
我总是收到错误:
I always receive the error:
...ERROR: (gcloud.container.clusters.create) ResponseError: code=400, message=The user does not have access to service account "default".
如何授予my-svc帐户访问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 Actor" permissions activated. Adding "Service Account Actor" resolves this error.
这篇关于gcloud:用户无权访问服务帐户“默认”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文