我已经按照Google Cloud Platform Guide中的步骤进行操作,但是仍然出现权限错误。表示呼叫者没有权限。请问我在做什么错。
这是超出命令gcloud config list
region = us-central1
zone = us-central1-f
[core]
account = <gmail-account>
disable_usage_reporting = True
project = <project-id>
Your active configuration is: [default]
这是它引发的错误
ERROR: (gcloud.app.deploy) Error Response: [13] Flex operation projects/<project-id>/regions/europe-west1/operations/error [INTERNAL]: An internal error occurred while processing task /appengine-flex-v1/insert_flex_deployment/flex_create_resources>2020-07-28T15:45:31.962Z49210.jv.11: Deployment Manager operation <project-id>/operation-... errors: [code: "RESOURCE_ERROR"
location: "/deployments/aef-default-..../resources/aef-default-...."
message: "{\"ResourceType\":\"compute.beta.regionAutoscaler\",
\"ResourceErrorCode\":\"403\",
\"ResourceErrorMessage\":{\"code\":403,
\"message\":\"The caller does not have permission\",
\"status\":\"PERMISSION_DENIED\",
\"statusMessage\":\"Forbidden\",
\"requestPath\":\"https://compute.googleapis.com/compute/beta/projects/<project-id>/regions/europe-west1/autoscalers\",
\"httpMethod\":\"POST\"}}"
答案 0 :(得分:1)
请检查您的project quotas,通常是当您的项目没有足够的IP或VM(App Engine Flex使用Compute Engine VM)并且app.yaml
上的扩展策略超出了配额。
请尝试在app.yaml
文件中添加以下块之一
用于自动缩放
automatic_scaling:
min_num_instances: 1
max_num_instances: 2
用于手动缩放
manual_scaling:
instances: 2
为避免耗尽这些配额,请删除/停止不需要的App Engine服务版本。
有关缩放策略的更多信息,请检查此reference guide
例如: 每个VM都有1个IP,您的项目的配额为4。
如果您的App Engine服务具有3个正在运行的VM(已使用3个IP),则在下一个部署中,如果min_instances
文件中的instances
或app.yaml
,则只有1个IP大于1,则部署将失败。
这是因为不可能在您的项目上分配超过4个IP,并且App引擎首先打开新实例,然后关闭旧实例,这是为了避免服务中断
如果您需要增加此资源配额,则必须contact a GCP sales rep。