hardMultiple ChoiceObjective-mapped
Google ACE Practice Question: Deploying a Cloud Run service revision that…
You are deploying a Cloud Run service revision that should initially receive 0% of traffic (for testing via a direct URL), while the existing revision continues to serve 100% of production traffic. Which `gcloud run deploy` flag achieves this?
⚠ Common exam trap
Many candidates confuse traffic routing with instance scaling, assuming `--min-instances=0` or a bare `--traffic=0` would prevent traffic, when in fact Cloud Run requires explicit traffic management via `--no-traffic` or the `--traffic` flag with a revision identifier.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
`--no-traffic`
The `--no-traffic` flag on `gcloud run deploy` deploys a new revision but directs 0% of traffic to it, leaving the existing revision serving 100% of production traffic. This allows you to test the new revision via its direct URL without impacting live users. It is the correct and explicit way to achieve a zero-traffic deployment in Cloud Run.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
`--no-traffic`
Why this is correct
--no-traffic deploys the new revision while setting its traffic share to 0%, leaving the current live revision (or existing traffic split) untouched. The deploy creates an immutable revision with a unique URL that can trigger the revision in isolation, enabling you to test the new code with production settings and dependencies before promoting it. This is the standard pattern for safe canary or blue/green deployment on Cloud Run.
- ✗
`--traffic=0`
Why it's wrong here
The --traffic flag modifies traffic routing between revisions; when deploying a new revision, --traffic expects a positive integer percentage to indicate how much load that revision should receive. Setting --traffic=0 is not the documented way to create a zero-traffic deployment, because Cloud Run interprets the flag in the context of traffic splitting rather than as an initial deployment guard. The correct mechanism to deploy a revision without serving any requests is the --no-traffic flag, which explicitly assigns 0% traffic while leaving existing traffic routing unchanged.
- ✗
`--revision-suffix=canary` with no traffic configuration
Why it's wrong here
--revision-suffix=canary only customizes the generated revision name to make it recognizable in logs and dashboards; it does not affect traffic routing. Without an explicit --no-traffic or a traffic-splitting flag, Cloud Run's default behavior is to route 100% of requests to the newly deployed revision, so the 'canary' would actually serve all live traffic. To run a true canary, you must combine the suffix with --no-traffic first (or use --traffic to control the split), otherwise the name is just a label.
- ✗
`--min-instances=0 --max-instances=0`
Why it's wrong here
Setting --min-instances=0 --max-instances=0 would disable autoscaling entirely: with zero maximum instances, the Cloud Run service cannot place any container instances to handle requests, so even a test via the revision URL would fail. These flags control cold start, scaling limits, and idle instance counts — they have no effect on traffic routing. To test a new revision without exposing it to live users, you should use --no-traffic, not attempt to manipulate instance counts.
Go deeper
Related to this question
Learn chapter
Google Cloud Platform Overview
Key term
Service
A service is a software component or system that performs a specific function and is available to be used by other programs or users over a network.
Key term
Cloud Run
Cloud Run is a fully managed compute platform from Google Cloud that lets you run containerized applications in a serverless environment, automatically scaling from zero to thousands of requests.
About these practice questions
This ACE question is part of Courseiva's 769-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.