Bird
0
0

You try kubectl rollout history deployment/db-service --revision=5 but get an error saying revision 5 does not exist. What should you do?

medium📝 Troubleshoot Q7 of 15
Kubernetes - ReplicaSets and Deployments
You try kubectl rollout history deployment/db-service --revision=5 but get an error saying revision 5 does not exist. What should you do?
AUse <code>kubectl describe deployment db-service</code> instead
BDelete and recreate the deployment
CRestart the Kubernetes cluster
DRun <code>kubectl rollout history deployment/db-service</code> to list available revisions
Step-by-Step Solution
Solution:
  1. Step 1: Understand revision error

    If revision 5 does not exist, you need to check which revisions are available.
  2. Step 2: List all revisions

    Running kubectl rollout history deployment/db-service lists all existing revisions to choose from.
  3. Final Answer:

    Run kubectl rollout history deployment/db-service to list available revisions -> Option D
  4. Quick Check:

    List revisions to find valid revision numbers [OK]
Quick Trick: List revisions before querying a specific revision [OK]
Common Mistakes:
  • Deleting deployment unnecessarily
  • Using describe which doesn't show revision history
  • Restarting cluster without cause

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes