google-cloud-platform - 使用 'gcloud run deploy' 时,如何使用命令行参数指定服务名称?

标签 google-cloud-platform gcloud google-cloud-run

使用时 gcloud run deploy ,如何使用命令行参数指定服务名称?我希望防止在部署时需要交互。
我目前正在像这样部署我的服务:

gcloud run deploy --image gcr.io/<PROJECT>/<TAG> --platform managed

最佳答案

有一个服务参数,它是定位的,而不是命名的。

从文档:

gcloud run deploy [[SERVICE] --namespace=NAMESPACE] etc...

所以你可以这样做:
gcloud run deploy <SERVICE_NAME> --image gcr.io/<PROJECT>/<TAG> --platform managed

https://cloud.google.com/sdk/gcloud/reference/run/deploy#POSITIONAL-ARGUMENTS

关于google-cloud-platform - 使用 'gcloud run deploy' 时,如何使用命令行参数指定服务名称?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61828343/

相关文章:

node.js - Google Cloud 数据存储事务实现

python - 有没有办法将 azure Eventhub 检查点存储到远程存储桶(例如 Google 云存储桶)?

google-cloud-platform - 如何将公共(public)和私有(private)保留 IP 附加到 GCE 实例?

kubernetes - 如何在主节点上运行kube-proxy?

google-cloud-platform - gcloud 命令行 添加 ssl 证书到 lb

google-cloud-platform - NestJS 日志与 Google Cloud Stackdriver 详细级别不匹配

docker - 在 Google Cloud Run(Docker 镜像)上运行 FastAPI

google-app-engine - gcloud 应用程序部署给出 400/禁止错误/无法将 img 推送到谷歌容器注册表

google-bigquery - bq cmd查询Google表格出现 "Access Denied: BigQuery BigQuery: No OAuth token with Google Drive scope was found"错误

docker - 如何正确配置 Dockerfile 以在 Google Cloud Run 上运行?