Your Cloud Run service "payment-api" runs in the us-central1 region on the fully managed platform. It currently routes 100 % of traffic to revision "payment-api-00009-abc". After deploying a new revision "payment-api-00010-def" with the --no-traffic flag, you decide to start a canary release that sends 15 % of requests to the new revision and keeps the remaining traffic on the existing one. Which gcloud command meets the requirement without causing downtime?
To split traffic between existing revisions you use gcloud run services update-traffic SERVICE --to-revisions and list each revision with the integer percentage of traffic it should receive. The percentages must be whole numbers that add up to 100. The correct command therefore specifies both revision IDs and their desired shares (15 and 85) and includes the --platform and --region flags for a fully managed service in us-central1.
The second choice redeploys an image and uses the --traffic flag without specifying the target revision, which would instead split traffic to a newly deployed revision-not the one that was already created with --no-traffic. The third choice tries to combine --to-latest with an invalid --traffic-percent flag and cannot set a partial split. The fourth choice provides fractional values (0.15 and 0.85); Cloud Run's CLI requires integer percentages, so the command will be rejected. Hence, only the first command accomplishes the requested 15 %/85 % split safely.
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 is the purpose of the --no-traffic flag in Cloud Run?
Open an interactive chat with Bash
Why do the percentages for traffic split need to be whole numbers in the gcloud command?
Open an interactive chat with Bash
What is the difference between --to-revisions and --to-latest flags in Cloud Run?
Open an interactive chat with Bash
What is a canary release in Cloud Run?
Open an interactive chat with Bash
How does the --no-traffic flag work in the gcloud CLI?
Open an interactive chat with Bash
Why must traffic percentages in Cloud Run be whole numbers?
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
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .