Cloud Run Zero-Downtime Deployment Strategy
A company wants to automate the deployment of a microservice application to Cloud Run using Cloud Build. They want to ensure zero-downtime deployments and traffic migration. Which three features should they utilize? (Choose three.)
Quick Answer
The answer is to utilize Cloud Run revision traffic splitting, Cloud Build triggers, and deploying with the --no-traffic flag. This combination enables a Cloud Run zero-downtime deployment strategy by first building and deploying a new revision without serving any traffic, then using traffic splitting to gradually shift user requests from the old revision to the new one, ensuring no requests are dropped during the transition. On the Google Professional Cloud Developer exam, this scenario tests your understanding of Cloud Run’s deployment lifecycle and traffic management, often appearing as a multi-select question where a common trap is choosing “rolling update” or “load balancer” instead of the native --no-traffic flag. A key memory tip is to think of the three steps as “Build, Stage, Shift”: Cloud Build triggers automate the build, --no-traffic stages the revision without exposure, and traffic splitting shifts the load incrementally.
⚠ Common exam trap
Google often tests the distinction between features that enable automation (like triggers) versus features that manage traffic (like splitting and no-traffic flags), and the trap here is that candidates might select 'managed continuous deployment' (C) as a separate feature when it is actually a combination of triggers and deployment settings, leading to an incorrect count of three distinct features.
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
✓
Cloud Build triggers to build and deploy on code changes.
Cloud Build triggers can be configured to automatically build and deploy a microservice to Cloud Run whenever code changes are pushed to a repository. This enables continuous delivery and ensures that the latest code is deployed without manual intervention, supporting zero-downtime deployments when combined with traffic management features.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Cloud Build triggers to build and deploy on code changes.
Why this is correct
Triggers automate the build and deploy pipeline on code changes.
- ✗
Cloud Run min and max instance settings.
Why it's wrong here
Instance settings control scaling, not deployment strategy.
- ✗
Cloud Run managed continuous deployment from a repository.
Why it's wrong here
This is a feature but not directly integrated with Cloud Build; the question specifies using Cloud Build.
- ✓
Cloud Run gradual rollout with --no-traffic flag.
Why this is correct
Deploying with --no-traffic creates a new revision without serving traffic, then traffic can be shifted gradually.
- ✓
Cloud Run revision traffic splitting.
Why this is correct
Traffic splitting allows gradual migration of traffic between revisions.
Go deeper
Related to this question
About these practice questions
One of 964 original PCD practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on PCD
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company deploys a containerized application to Cloud Run using Cloud Build. They want to implement a rolling update strategy with zero downtime. Which two actions should they take? (Choose two.)
easy- ✓ A.Gradually shift traffic to the new revision using the gcloud run services update-traffic command.
- B.Create a new Cloud Run service for the new revision.
- ✓ C.Deploy the new revision with the --no-traffic flag.
- D.Set the min-instances attribute to 1 to keep at least one instance running.
- E.Use the gcloud run deploy command with the --concurrency flag.
Why A: The `gcloud run services update-traffic` command allows you to gradually shift traffic from the current revision to a new revision, enabling a rolling update with zero downtime. This command supports percentage-based traffic splitting, which ensures that the new revision is incrementally exposed to users while the old revision remains active, thus maintaining service availability throughout the deployment.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PCD 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 PCD exam.