[英]When using 'gcloud run deploy', how can I specify the service name with command line args?
When using gcloud run deploy
, how can I specify the service name with command-line args?使用
gcloud run deploy
时,如何使用命令行参数指定服务名称? I'm hoping to prevent the need for interactivity at deploy-time.我希望避免在部署时需要交互。
I'm currently deploying my service like so:我目前正在像这样部署我的服务:
gcloud run deploy --image gcr.io/<PROJECT>/<TAG> --platform managed
There is a service parameter, which is positional as opposed to named.有一个服务参数,它是定位的而不是命名的。
From the docs:从文档:
gcloud run deploy [[SERVICE] --namespace=NAMESPACE] etc...
So you could do this:所以你可以这样做:
gcloud run deploy <SERVICE_NAME> --image gcr.io/<PROJECT>/<TAG> --platform managed
https://cloud.google.com/sdk/gcloud/reference/run/deploy#POSITIONAL-ARGUMENTS https://cloud.google.com/sdk/gcloud/reference/run/deploy#POSITIONAL-ARGUMENTS
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.