错误:(gcloud.run.deploy) 解析 [service] 时出错。[service] 资源未正确指定。未能找到属性 [服务]

Sal*_*lam 0 node.js google-cloud-platform google-cloud-run

我正在尝试使用以下命令将我的 nodejs 应用程序部署到云运行

 gcloud run deploy --image gcr.io/[project-id]/helloworld --platform managed
Run Code Online (Sandbox Code Playgroud)

在运行此命令之前,我构建了两个云构建映像并尝试使用上述命令部署最新构建。但是得到以下错误

ERROR: (gcloud.run.deploy) Error parsing [service].
The [service] resource is not properly specified.
Failed to find attribute [service]. The attribute can be set in the following ways:
- provide the argument [SERVICE] on the command line
- specify the service name from an interactive prompt
Run Code Online (Sandbox Code Playgroud)

我不知道是哪个导致错误。有人可以帮我解决这个问题吗?谢谢

Max*_*xim 5

尝试将服务 ID指定为参数,替换my-service为所需的名称:

gcloud run deploy my-service --image gcr.io/[project-id]/helloworld --platform managed
Run Code Online (Sandbox Code Playgroud)

此外,请确保您使用的是最新的 Cloud SDK 和gcloud components update.