Your development team needs to deploy a new container image to an existing Cloud Run service, but they must keep all production traffic on the currently serving revision. QA engineers will later run manual tests by explicitly referencing the new revision's URL. Which gcloud command meets this requirement?
gcloud run deploy my-service --image=gcr.io/project/app:v2 --region=us-central1 --platform=managed --revision-suffix=qa --no-traffic
gcloud run services update-traffic my-service --to-revisions=latest=0 --region=us-central1
gcloud run deploy my-service --image=gcr.io/project/app:v2 --region=us-central1 --platform=managed
gcloud run deploy my-service --image=gcr.io/project/app:v2 --region=us-central1 --tag=qa --set-env-vars=TRAFFIC=0
Including the --no-traffic flag on gcloud run deploy creates a new revision from the specified container image but assigns it 0 % of incoming requests. The existing revision therefore continues to receive 100 % of production traffic, while the newly created revision can still be reached directly through its automatically generated URL for QA testing. Omitting --no-traffic (or using services update-traffic without adjusting traffic percentages) would move traffic to the new revision immediately. The --tag flag and environment variables do not control traffic routing, so they do not satisfy the requirement.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the --no-traffic flag do in gcloud run deploy?
Open an interactive chat with Bash
How can QA engineers access the new revision's URL in Cloud Run?
Open an interactive chat with Bash
Why doesn't the --tag flag manage traffic in Cloud Run?
Open an interactive chat with Bash
What does the --no-traffic flag do in the gcloud command?
Open an interactive chat with Bash
How do you access a specific revision URL in Cloud Run?
Open an interactive chat with Bash
What happens if you deploy a Cloud Run service without the --no-traffic flag?
Open an interactive chat with Bash
GCP Associate Cloud Engineer
Ensuring successful operation of a cloud solution
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .