Question 34
Domain 2: Application Deployment and WorkloadsWhich kubectl command shows the rollout history of a Deployment and its revisions?
Correct answer: A
Explanation
`kubectl rollout history deployment/<deployment-name>` is the command used to display a Deployment’s rollout history and revision numbers. It follows the `kubectl rollout history` subcommand, which is designed to show the recorded revisions for a workload such as a Deployment.
Why each option is right or wrong
A. kubectl rollout history deployment/<deployment-name>
Under the Kubernetes `kubectl rollout` subcommand set, `history` is the specific verb used to inspect recorded revisions for a workload, and the resource form `deployment/<name>` targets a Deployment object directly. The command returns the rollout history entries and revision numbers stored for that Deployment, rather than applying changes or showing live status, which is why this syntax is the correct one for reviewing past revisions.
B. kubectl describe deployment/<deployment-name> --history
C. kubectl get deployment/<deployment-name> --revisions
D. kubectl rollout status deployment/<deployment-name> --history