【问题标题】:Can't deploy service on google cloud无法在谷歌云上部署服务
【发布时间】:2020-06-20 18:49:03
【问题描述】:

我正在尝试使用谷歌云终端发布我的烧瓶 api。

在谷歌云终端上输入“gcloud app deploy”后一段时间后我收到此错误

 {\"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/<MYAPPNAME>/regions/europe-west1/autoscalers\",
    \"httpMethod\":\"POST\"}

这些权限是我自己授予的:

【问题讨论】:

  • 尝试运行 gcloud app deploy --log-http --verbosity:debug 并与我们分享输出
  • 我通过在 app.yaml 中添加一些设置解决了这个问题

标签: python api web-services flask google-cloud-platform


【解决方案1】:

我更改了 app.yaml 并添加了

automatic_scaling:
    min_num_instances: 1
    max_num_instances: 7    

到它。它解决了问题!

【讨论】:

    猜你喜欢
    • 2020-03-05
    • 2017-08-15
    • 2021-02-26
    • 2020-04-20
    • 2019-04-12
    • 1970-01-01
    • 2020-08-25
    • 1970-01-01
    • 2017-11-19
    相关资源
    最近更新 更多