Google ACE Practice Question: Ensuring Successful Operation of a Cloud Solution
A Cloud Run service named 'my-service' is currently serving 100% traffic to revision 'rev1'. You deploy a new revision 'rev2' and want to gradually shift traffic so that rev2 receives 10% of requests. Which command should you use?
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
✓
gcloud run services update-traffic my-service --to-revisions=rev2=10,rev1=90
gcloud run services update-traffic allows you to set traffic percentages per revision. The syntax is --to-revisions=REVISION=PERCENTAGE.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
gcloud run services update-traffic my-service --to-revisions=rev2=10,rev1=90
Why this is correct
This is the correct service-level command for a precise traffic split between two existing revisions. It specifies both revisions explicitly, so Cloud Run routes exactly 10% of requests to rev2 and 90% to rev1; percentages must sum to 100 and should be entered as bare integers (no '%' sign). Because it uses `--to-revisions` on `update-traffic`, it works for rollbacks and gradual shifts without creating a new revision.
- ✗
gcloud run services update my-service --traffic=rev2=10%
Why it's wrong here
The `--traffic` flag is not defined for `gcloud run services update`; that command updates service configuration such as image or concurrency, not traffic routing. Even if a `--traffic` flag existed, the value `rev2=10%` mixes a revision reference with a percentage sign, which is not the expected format. Traffic changes require the dedicated `gcloud run services update-traffic` subcommand with flags like `--to-revisions`.
- ✗
gcloud run deploy my-service --image=... --traffic=rev2=10
Why it's wrong here
`gcloud run deploy` is intended to deploy a new revision from a container image; it does not accept `--traffic=rev2=10` because it cannot reassign traffic among two arbitrary existing revisions. The `--traffic` flag on deploy, when used, takes a single integer percentage to route to the newly created revision, so the left-hand side of the assignment would have to be omitted. For a 10/90 split between existing revisions, `gcloud run services update-traffic --to-revisions=rev2=10,rev1=90` is the correct approach.
- ✗
gcloud run revisions update rev2 --traffic=10
Why it's wrong here
There is no `gcloud run revisions update` subcommand for altering routing, and revision objects themselves are immutable once created. Traffic percentages are a property of the Cloud Run service, not of an individual revision, so attempting to set `--traffic=10` on a revision is both a command error and a logical error. In Cloud Run, you attach a revision to a service and then use service-level commands to direct traffic to it.
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
Courseiva writes every ACE question from scratch — 769 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.