Courseiva

Google ACE Deploying and Implementing a Cloud Solution Practice Question

An engineer deployed a new version of their application on GKE using a Deployment. Users report that the new version has a bug. The engineer wants to quickly revert to the previous version. How can they achieve this?

⚠ Common exam trap

ACE often tests the difference between `kubectl rollout undo` (which performs a rollback) and `kubectl rollout history` (which only shows revisions), causing candidates to confuse viewing history with reverting.

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

✓

Run kubectl rollout undo deployment/<deployment-name>

The `kubectl rollout undo` command is specifically designed to revert a Deployment to a previous revision. When you run `kubectl rollout undo deployment/<deployment-name>`, Kubernetes updates the Deployment's pod template to match the previous ReplicaSet, triggering a new rollout that restores the old version. This is the fastest and most reliable way to roll back a bad deployment.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Scale the deployment to zero and then scale back up

    Why it's wrong here

    Scaling a Deployment to zero terminates all Pods; scaling back up creates new Pods using the Deployment's current Pod template, which still contains the new application version. This action never alters the Deployment's pod template or its associated ReplicaSet, so the old version is not restored. Furthermore, this approach introduces full downtime, making it unsuitable as a rollback strategy.

  • ✗

    Run kubectl delete deployment and re-apply the old manifest

    Why it's wrong here

    Deleting the Deployment removes the Deployment resource, its underlying ReplicaSets, and all Pods, immediately causing a service outage. Re-applying an old manifest not only requires that you still possess that old YAML file, but it also creates a fresh Deployment with a clean rollout history, discarding the revision evidence you might need. This manual, destructive procedure is inconsistent with Kubernetes' declarative lifecycle management and should be avoided when a built-in rollback mechanism exists.

  • ✓

    Run kubectl rollout undo deployment/<deployment-name>

    Why this is correct

    `kubectl rollout undo deployment/<deployment-name>` instructs the Deployment controller to revert to the previous revision by restoring the prior Pod template and rolling it out with the same gradual scaling strategy—creating a new ReplicaSet while terminating the current one in a controlled fashion. This preserves availability because the controller scales up the new/old ReplicaSet before scaling down the current one. The command is the canonical, declarative way to undo a bad deployment with minimal downtime.

  • ✗

    Run kubectl rollout history deployment/<deployment-name>

    Why it's wrong here

    `kubectl rollout history deployment/<deployment-name>` is a read-only command that lists all rollout revisions, including their REVISION numbers and CHANGE-CAUSE annotations. It does not modify the Deployment, ReplicaSets, or Pods, so running it cannot undo a bad deployment. To actually revert, you would need to follow it with `kubectl rollout undo` and optionally the `--to-revision` flag; simply viewing history leaves the current version running.

About these practice questions

This ACE question is part of Courseiva's 775-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Google Cloud exam blueprint

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.