0
0
Kubernetesdevops~20 mins

Deployment status and history in Kubernetes - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Deployment Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:30remaining
Check the rollout status of a deployment
You run the command kubectl rollout status deployment/myapp. What output indicates the deployment has successfully rolled out?
Adeployment "myapp" successfully rolled out
BError from server (NotFound): deployments.apps "myapp" not found
Cdeployment "myapp" failed to rollout
DWaiting for deployment "myapp" rollout to finish: 1 out of 3 new replicas have been updated...
Attempts:
2 left
💡 Hint
Look for a message confirming success, not errors or partial updates.
🧠 Conceptual
intermediate
1:30remaining
Understanding deployment revision history
What does the command kubectl rollout history deployment/myapp show?
AA list of all revisions of the deployment with change causes
BThe YAML manifest of the deployment
CThe status of all pods in the deployment
DThe current pod logs for the deployment
Attempts:
2 left
💡 Hint
Think about what 'history' means in this context.
Troubleshoot
advanced
2:00remaining
Diagnosing a stuck deployment rollout
You notice a deployment rollout is stuck and not progressing. Which command helps you see detailed rollout status including pod conditions?
Akubectl get pods --all-namespaces
Bkubectl describe deployment myapp
Ckubectl logs deployment/myapp
Dkubectl rollout undo deployment/myapp
Attempts:
2 left
💡 Hint
You want detailed info about the deployment and its pods.
🔀 Workflow
advanced
2:00remaining
Rollback a deployment to a previous revision
You want to rollback the deployment myapp to revision 2. Which command correctly performs this rollback?
Akubectl revert deployment/myapp --revision 2
Bkubectl rollback deployment myapp --revision=2
Ckubectl undo deployment myapp revision 2
Dkubectl rollout undo deployment/myapp --to-revision=2
Attempts:
2 left
💡 Hint
Check the exact syntax for rollback with revision number.
Best Practice
expert
2:30remaining
Best practice for monitoring deployment history in production
Which approach is best to keep track of deployment history and changes in a Kubernetes production environment?
AManually save deployment YAML files on local machines after each change
BRely only on <code>kubectl get pods</code> to check running pods after deployment
CUse <code>kubectl rollout history</code> combined with GitOps to track deployment manifests and changes
DUse <code>kubectl logs</code> of pods to track deployment changes
Attempts:
2 left
💡 Hint
Think about combining Kubernetes tools with version control for best tracking.