Rolling back a bad Deployment
WHAT IT TESTS: Knowledge of Deployment rollback mechanics. OUTLINE: kubectl rollout undo deployment/NAME reverts to the prior revision by scaling the old ReplicaSet back up and the bad one down.
WHAT IT TESTS: Whether you can recover from a bad release and understand the underlying mechanism. ANSWER OUTLINE: Run kubectl rollout undo deployment/NAME, optionally with --to-revision=N. Kubernetes does not rebuild anything; it simply scales the previous ReplicaSet (still kept at zero from the earlier rollout) back up and scales the current bad ReplicaSet down, performing another rolling update in reverse. View history with kubectl rollout history.
Read the original → interview
- #kubernetes
- #rollback
- #deployment
- #rollout
- #incident-response
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.