Google Cloud App Engine Flexbile 配额错误

问题描述

ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: The following quotas were exceeded: cpuS (quota: 
0,used: 0 + needed: 4).

尝试使用 gcloud 在新的谷歌云项目中的 App Engine 柔性环境中部署 nodejs 应用程序。

runtime: nodejs
env: flex
resources:
  cpu: 2
  memory_gb: 3.5
  disk_size_gb: 20
network:
  name: default
env_variables:
  NODE_ENV: production

由于某种原因,我无法在应用引擎柔性环境中成功部署。

解决方法

如果您正在免费试用,这是一个已知问题或该地区(亚洲-南部)的缺货问题。以下是我的建议:

  1. 尝试在 app.yaml 中添加并部署:
automatic_scaling:
  min_num_instances: 1
  max_num_instances: 7
  1. 在 App Engine Standard 上运行或部署。
  2. 更改 App Engine 的区域。请注意,您不能更改您的 App Engine 区域,您需要创建一个新项目并设置其他区域除了 asia-south
  3. 在不同的 product 上运行或部署应用。
  4. Google Cloud 现在提供了一项称为预留的功能,可保证 Google Cloud 的容量,有关如何使用此功能的详细信息,请参阅此 document
  5. 创建 CPU 配额请求。