Courseiva
Application Deployment →hardMultiple Choice

CKAD Application Deployment Practice Question

You have a Deployment that is failing after a rollout. You want to revert to the previous revision. Which command accomplishes this?

⚠ Common exam trap

CKAD often tests the confusion between 'rollout undo' and 'rollout history' or 'rollout resume', and candidates might mistakenly think they need to manually delete and recreate the deployment.

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/myapp

The command 'kubectl rollout undo deployment/myapp' reverts a Deployment to its previous revision by rolling back to the last revision in the rollout history. This is the standard and simplest way to undo a failed rollout in Kubernetes.

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 rollout history deployment/myapp --revision=previous

    Why it's wrong here

    The `kubectl rollout history` command with the `--revision` flag is a read-only operation: it displays the ReplicaSet and image for a specific numeric revision, but it never mutates the live Deployment. Moreover, `previous` is not a valid revision number — the flag requires an integer such as `--revision=2`, so the command would actually fail. Even with a valid revision, to actually revert you must run `kubectl rollout undo`, which modifies the Deployment's pod template.

  • ✗

    kubectl rollout resume deployment/myapp

    Why it's wrong here

    `kubectl rollout resume` is the exact counterpart to `kubectl rollout pause`: it only tells a paused Deployment to continue applying whatever template is currently set. If the Deployment is not paused, this is a no-op, and it certainly does not switch to a previous, working template. A failing rollout indicates the current template is broken, so resuming won't heal it — you need `kubectl rollout undo` to replace the template with the last known-good state.

  • ✗

    kubectl delete deployment/myapp --cascade=orphan && kubectl apply -f old-deployment.yaml

    Why it's wrong here

    This option fails because it deletes the existing Deployment and then creates a new one from a manifest, rather than utilising the Deployment's built-in revision history. Reverting a failing rollout specifically requires `kubectl rollout undo`, which leverages the stored previous revision without destroying the Deployment's state. This command sequence is tempting as a manual rollback, and would be appropriate if you needed to entirely replace a Deployment with a version from a specific manifest file, discarding its history and potentially orphaned ReplicaSets for a fresh start.

  • ✓

    kubectl rollout undo deployment/myapp

    Why this is correct

    `kubectl rollout undo` is the proper remediation for a failing rollout because it instructs the Deployment controller to revert to the previous revision's pod template, creating a new ReplicaSet and scaling down the bad one. This is a mutating command that performs a rolling update, so it preserves the Deployment's UID, labels, and entire revision history, letting you redo the change later. Running undo directly is far safer than deleting and recreating with an old manifest, as it uses Kubernetes' built-in revision tracking rather than a manual, history-destroying replacement.

About these practice questions

One of 826 original CKAD 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 →

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 CNCF exam blueprint

This CKAD practice question is part of Courseiva's free CNCF 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 CKAD exam.