如何解决如何启用 GCP 服务,我得到一个 PERMISSION_DENIED
当我运行 gcloud services enable service:container.googleapis.com
时,出现以下错误:
ERROR: (gcloud.services.enable) PERMISSION_DENIED: Not found or permission denied for service(s): service:container.googleapis.com.
- '@type': type.googleapis.com/google.rpc.PreconditionFailure
violations:
- subject: ?error_code=220002&services=service:container.googleapis.com
type: googleapis.com
- '@type': type.googleapis.com/google.rpc.ErrorInfo
domain: serviceusage.googleapis.com
metadata:
services: service:container.googleapis.com
reason: SERVICE_CONFIG_NOT_FOUND_OR_PERMISSION_DENIED
我缺少什么权限导致此错误?
解决方法
根据这个document,应该是这样的:
gcloud services enable [SERVICE_NAME]
或
gcloud services enable container.googleapis.com
您还可以查看项目的可用服务列表,运行:
gcloud services list --available
并且要列出当前项目已启用的服务,请运行:
gcloud services list --enabled
我在下面使用过并且有效。我只是使用 CONTAINER 作为服务名称,而不是使用 container.googleapis.com
gcloud 服务启用容器
操作“operations/acf.p2-768261041254-0cc69e23-b9e8-449f”成功完成。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。