CKAD Application Deployment Practice Question
Which command is used to rollback a Deployment to the previous revision?
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-deployment
'kubectl rollout undo deployment my-deployment'. Option B rolls forward? Option C is not valid. Option D is for history.
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 undo deployment my-deployment
Why this is correct
The `kubectl rollout undo deployment my-deployment` command is the correct rollback mechanism because it reverts the Deployment to the previously active ReplicaSet, effectively restoring the last known good Pod template. You can optionally specify `--to-revision` to target a specific historical revision; otherwise, it undoes only the most recent rollout, scaling down the current ReplicaSet and scaling up the prior one.
- ✗
kubectl rollout redo deployment my-deployment
Why it's wrong here
`kubectl rollout redo deployment my-deployment` is invalid because `redo` is not a subcommand of `kubectl rollout`. The valid rollout subcommands are `history`, `pause`, `restart`, `resume`, `status`, and `undo`; since `redo` does not exist, kubectl would immediately fail with a syntax error and perform no action whatsoever.
- ✗
kubectl rollout revert deployment my-deployment
Why it's wrong here
`kubectl rollout revert deployment my-deployment` might sound semantically appropriate, but `revert` is not a recognized verb in kubectl's rollout command group. The actual verb used for rolling back is `undo`, and kubectl strictly parses its subcommands; passing `revert` results in an error such as 'unknown command' and does not alter the Deployment's state.
- ✗
kubectl rollout history deployment my-deployment
Why it's wrong here
`kubectl rollout history deployment my-deployment` is a read-only informational command that lists all previous revision numbers and their change causes. It is useful for inspecting rollout history or for determining which `--to-revision` to use with `undo`, but it never modifies the Deployment's desired state, so it cannot perform a rollback on its own.
Go deeper
Related to this question
About these practice questions
This CKAD question is part of Courseiva's 826-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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.