Question 232 of 500
Deploying and implementing a cloud solutionmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is `kubectl rollout undo deployment/my-app`. This command is correct because it instructs Kubernetes to revert the Deployment's desired state to the immediately preceding revision, using the built-in revision history that the Deployment controller automatically maintains for each change. When a new version introduces a regression, this single command restores the previous stable configuration without requiring you to manually locate or reapply an old YAML manifest. On the Google Associate Cloud Engineer exam, this question tests your understanding of imperative rollback operations versus declarative manifest reapplication; a common trap is choosing `kubectl apply -f old-manifest.yaml` instead, which can cause drift if the manifest doesn't match the exact prior revision. To remember the syntax, think "undo" as in "undo your last action" — just like Ctrl+Z in an editor, `rollout undo` reverses the most recent rollout.

Google ACE Deploying and implementing a cloud solution Practice Question

This ACE practice question tests your understanding of deploying and implementing a cloud solution. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A team wants to roll back a GKE Deployment to its previous revision because the new version introduced a regression. Which kubectl command performs this rollback?

Question 1mediummultiple choice
Full question →

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

kubectl rollout undo deployment/my-app

Option B is correct because `kubectl rollout undo deployment/my-app` is the standard Kubernetes command to roll back a Deployment to the previous revision. This command leverages the Deployment's revision history, which is automatically maintained by the Kubernetes controller, to revert the desired state to the prior revision without needing to manually reapply an old manifest.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • kubectl revert deployment/my-app --to-previous

    Why it's wrong here

    `kubectl revert` is not a valid kubectl command. Use `kubectl rollout undo`.

  • kubectl rollout undo deployment/my-app

    Why this is correct

    `kubectl rollout undo` reverts the Deployment to the previous ReplicaSet, effectively rolling back to the last stable version.

    Related concept

    Read the scenario before looking for a memorised answer.

  • kubectl apply -f previous-deployment.yaml

    Why it's wrong here

    This works if you have the old YAML, but requires the file to be available and up-to-date. `kubectl rollout undo` is simpler and uses Kubernetes' built-in revision history.

  • kubectl delete deployment/my-app && kubectl create -f deployment.yaml

    Why it's wrong here

    Deleting and recreating causes unnecessary downtime and loses Deployment history. `kubectl rollout undo` is the correct tool.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Google Cloud often tests the distinction between `rollout undo` and non-existent commands like `revert`, or the misconception that reapplying an old YAML file is equivalent to a proper rollback, when in fact it bypasses the Deployment's revision history and can cause version mismatches.

Trap categories for this question

  • Command / output trap

    `kubectl revert` is not a valid kubectl command. Use `kubectl rollout undo`.

Detailed technical explanation

How to think about this question

Under the hood, `kubectl rollout undo` works by modifying the Deployment's `spec.template` to match the template stored in the previous revision's ReplicaSet. The Deployment controller maintains a revision history via ReplicaSets, each with an annotation like `deployment.kubernetes.io/revision`; the undo command decrements the revision number and updates the Deployment accordingly. In a real-world scenario, if a Deployment has multiple revisions (e.g., revision 3 is broken), `kubectl rollout undo deployment/my-app` rolls back to revision 2, but you can also specify `--to-revision=1` to target a specific older revision, which is critical when the immediate previous revision is also faulty.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related ACE practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free ACE practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this ACE question test?

Deploying and implementing a cloud solution — This question tests Deploying and implementing a cloud solution — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: kubectl rollout undo deployment/my-app — Option B is correct because `kubectl rollout undo deployment/my-app` is the standard Kubernetes command to roll back a Deployment to the previous revision. This command leverages the Deployment's revision history, which is automatically maintained by the Kubernetes controller, to revert the desired state to the prior revision without needing to manually reapply an old manifest.

What should I do if I get this ACE question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More ACE practice questions

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.