Google ACE Practice Question: Ensuring Successful Operation of a Cloud Solution
You have a Cloud Run service that you want to update to use a new container image. You also want to keep the previous revision available in case you need to roll back. 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 deploy my-service --image gcr.io/my-project/my-app:v2
gcloud run deploy creates a new revision and by default keeps the previous revision(s).
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 deploy my-service --image gcr.io/my-project/my-app:v2
Why this is correct
Running 'gcloud run deploy my-service --image gcr.io/my-project/my-app:v2' is the correct way to update a Cloud Run service's container image. The deploy command prepares a new immutable revision with the specified image, makes it the latest revision, and automatically routes traffic to it according to your service's traffic policy. Existing revisions are preserved in the revision history, enabling immediate rollback via 'gcloud run services update-traffic' if the new revision misbehaves.
- ✗
gcloud run revisions update my-service --image gcr.io/my-project/my-app:v2
Why it's wrong here
The command 'gcloud run revisions update my-service --image gcr.io/my-project/my-app:v2' is invalid because the 'gcloud run revisions' command group only supports list, describe, and delete operations—not update. More fundamentally, Cloud Run revisions are immutable: once a revision is created by a deploy, its container image and configuration are locked and cannot be altered. To change the image, you must call 'deploy' a new revision, never attempt to mutate an existing one.
- ✗
gcloud run services update --image gcr.io/my-project/my-app:v2
Why it's wrong here
While 'gcloud run services update' is a real command, it does not accept an '--image' flag; its supported flags are limited to operational settings like '--concurrency', '--cpu', '--memory', '--timeout', and '--max-instances', as well as IAM and label updates. The container image for a Cloud Run service is supplied exclusively at deploy time via 'gcloud run deploy'. Any attempt to pass '--image' to 'services update' will fail because the CLI does not recognize the argument.
- ✗
kubectl set image service/my-service my-app=gcr.io/my-project/my-app:v2
Why it's wrong here
The kubectl command 'kubectl set image service/my-service my-app=gcr.io/my-project/my-app:v2' targets Kubernetes Service objects, which are load balancers or clusterIP endpoints, not serverless Cloud Run services. Fully managed Cloud Run does not expose a Kubernetes API, so kubectl cannot manage it; you must use the gcloud CLI or the Cloud Run Admin API. Even in Cloud Run for Anthos on GKE, you would update a Knative Service via 'kubectl apply', not a 'service' resource, making this option fundamentally inapplicable.
Go deeper
Related to this question
Learn chapter
Google Cloud Platform Overview
Key term
Container
A container is a lightweight, standalone software package that includes everything needed to run an application, such as code, runtime, system tools, and libraries.
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.
About these practice questions
One of 769 original ACE 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 →
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.