0
0
Kubernetesdevops~20 mins

Rollback to previous version in Kubernetes - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Rollback Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Rollback Deployment to Previous Revision
You have a Kubernetes deployment named webapp. You run the command to rollback to the previous revision. What is the expected output?
Kubernetes
kubectl rollout undo deployment/webapp
Adeployment.apps/webapp rolled back
Berror: deployment "webapp" not found
Cdeployment.apps/webapp updated
DNo resources found
Attempts:
2 left
💡 Hint
Think about what the rollback command does to the deployment state.
🧠 Conceptual
intermediate
2:00remaining
Understanding Rollback Behavior
Which statement correctly describes what happens when you run kubectl rollout undo deployment/myapp?
AIt pauses the deployment without changing the current state.
BIt deletes the deployment and recreates it from scratch.
CIt updates the deployment to the latest image version automatically.
DIt reverts the deployment to the last successful rollout revision.
Attempts:
2 left
💡 Hint
Rollback means going back to a previous working state.
Troubleshoot
advanced
2:00remaining
Rollback Failure Due to No Previous Revision
You try to rollback a deployment named api-server but get the error: error: deployment.apps "api-server" has no rollout history. What is the most likely cause?
AThe deployment has never been updated since creation.
BThe deployment name is misspelled in the command.
CThe Kubernetes cluster is down.
DThe rollback command requires a namespace flag.
Attempts:
2 left
💡 Hint
Rollback requires a previous revision to revert to.
🔀 Workflow
advanced
3:00remaining
Steps to Rollback a Deployment
Arrange the correct sequence of commands to rollback a Kubernetes deployment named frontend to its previous version and verify the rollback status.
A2,1,3,4
B1,2,3,4
C3,1,2,4
D1,3,2,4
Attempts:
2 left
💡 Hint
First rollback, then check status, then inspect details.
Best Practice
expert
3:00remaining
Best Practice for Safe Rollbacks
Which practice is best to ensure safe and reliable rollbacks of Kubernetes deployments?
ADisable rollout history to save cluster resources and rely on manual pod restarts.
BAlways delete the deployment and recreate it with the previous image version manually.
CUse <code>kubectl rollout undo</code> only after verifying the deployment history and testing the previous version in a staging environment.
DUse <code>kubectl delete pod</code> to force pods to restart with the previous version.
Attempts:
2 left
💡 Hint
Safe rollback involves verification and testing before applying changes.