我无法使用 Google Cloud Run 配置 Google Cloud Endpoint



我正在尝试为 Google Cloud Run 配置 Google Cloud Endpoint。 我使用的是 Google Cloud SDK 版本 250.0.0(最新版本),并且使用的是 Ubuntu 18.04。

我正在遵循本指南:https://cloud.google.com/endpoints/docs/openapi/get-started-cloud-run。 我能够部署 ESP、配置端点和部署端点配置。我无法配置按照指南创建的 ESP。如果我运行此命令

gcloud beta run configurations update 
--service CLOUD_RUN_SERVICE_NAME  
--set-env-vars ENDPOINTS_SERVICE_NAME=YOUR_SERVICE_NAME 
--project ESP_PROJECT_ID

我收到此错误

ERROR: (gcloud.beta.run.configurations) Invalid choice: 'update'.
Maybe you meant:
gcloud components update
gcloud firebase test android run
gcloud firebase test ios run
gcloud config configurations activate
gcloud config configurations create
gcloud config configurations delete
gcloud config configurations describe
gcloud config configurations list
gcloud config set
gcloud firebase test android locales describe

我还在此处搜索了gcloud beta run configurations的可用命令:https://cloud.google.com/sdk/gcloud/reference/beta/run/configurations/。命令update不可用,因此指南中可能存在错误。

我做错了什么?

这是文档中的错误,您应该使用以下命令:

gcloud beta run services update CLOUD_RUN_SERVICE_NAME --set-env-vars ENDPOINTS_SERVICE_NAME=YOUR_SERVICE_NAME --project ESP_PROJECT_ID

我创建了一个公共问题来解决这个问题。如果您想获得进度更新,可以为主题加注星标。

最新更新