我想在Semaphore上部署我的容器化应用程序。我正在为此使用GCP。但是每当我跑步
gcloud container clusters get-credentials demo \
--project "${project}" \
--zone europe-west1-b
它给出了错误 (gcloud.container.clusters.get)ResponseError:代码= 403, message = Google Compute Engine:必需的“ container.clusters.get”权限
答案 0 :(得分:1)
要使用list the account,以自己身份登录,activate a service account或authenticate an application,请选中此document。例如,要以您自己的身份进行身份验证,请使用:
gcloud auth login
然后,您可以向该服务帐户添加角色(包括“ container.clusters.get”)。 document中的以下角色具有权限
Kubernetes Engine管理员(roles / container.admin)
Kubernetes引擎群集管理(roles / container.clusterAdmin)
Kubernetes Engine开发人员(roles / container.developer)
Kubernetes引擎查看器(roles / container.viewer)
有时候,您可能需要创建一个custom role,然后在其中添加个人权限(例如'container.clusters.get')