CKAD Application Deployment Practice Question
You have just applied a new Deployment configuration using 'kubectl apply -f deployment.yaml'. You want to see the latest revision number of the rollout. Which command should you run?
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 history deployment/myapp
'kubectl rollout history deployment/<name>' shows revision history with revision numbers. The latest revision is shown as the most recent.
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 status deployment/myapp
Why it's wrong here
kubectl rollout status deployment/myapp blocks until the current rollout finishes, printing progress messages like 'Waiting for deployment specification update...' and finally 'deployment successfully rolled out'. It only reports the live status of the most recent rollout, such as whether it is pending, progressing, or complete, but it never enumerates past revisions. To see revision numbers, you would need the Deployment's revision annotation, which this command does not display, so it gives no historical view at all.
- ✗
kubectl get deployment myapp -o yaml
Why it's wrong here
kubectl get deployment myapp -o yaml outputs the entire Deployment object in YAML, including metadata.annotations with deployment.kubernetes.io/revision (the current revision) and kubernetes.io/change-cause (the last change reason). However, it only shows the current revision number and the latest desired state; it does not list prior revisions or their associated ReplicaSet identifiers. Parsing annotations from this output is indirect and incomplete, because you cannot see the full list of revisions without separately querying ReplicaSets or using rollout history.
- ✗
kubectl describe deployment myapp
Why it's wrong here
kubectl describe deployment myapp prints a human-readable summary of the Deployment's live state, including the current ReplicaSet, image, selector, and events, but it does not generate a revision history list. The output may include annotations like deployment.kubernetes.io/revision, but it does not show how many revisions exist, what changed in each, or their change causes. Since describe aggregates only the current status and does not expose the historical chain of ReplicaSets, it is not a appropriate tool for reviewing rollout revisions.
- ✓
kubectl rollout history deployment/myapp
Why this is correct
kubectl rollout history deployment/myapp is the dedicated command for displaying the rollout history of a Deployment. It lists each revision number, the change-cause annotation (if set), and the revision timestamps, directly derived from the underlying ReplicaSets created by the Deployment controller. This command provides a concise, numbered table that lets you compare revisions and identify which revision to roll back to, making it the correct and most direct way to see revision numbers in a deployment.
Go deeper
Related to this question
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 →
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.