A rollout that goes wrong is not an outage. It is a stuck rollout, and you can step back.
A bad image
learner@shallows:~$ kubectl set image deploy/market-web nginx=nginx:1.99-nope
learner@shallows:~$ kubectl get pods
NAME READY STATUS RESTARTS AGE
market-web-7676f9f845-2426w 1/1 Running 0 5m
market-web-7676f9f845-97gjb 1/1 Running 0 5m
market-web-7676f9f845-hwcqp 1/1 Running 0 5m
market-web-5b8c9d7f4b-k2xpd 0/1 ImagePullBackOff 0 20sOne new Pod tried to start and cannot. The three old Pods are still Running and still serving. The Deployment does not remove an old Pod until a new one is ready, so a bad image stalls the rollout instead of breaking the app. rollout status waits, then gives up with timed out.
Step back
learner@shallows:~$ kubectl rollout undo deploy/market-web
deployment.apps/market-web rolled backUndo copies the previous revision's template back into the Deployment. The old ReplicaSet was kept at 0 all along, so there is nothing to pull or build; the stuck Pod disappears.
learner@shallows:~$ kubectl rollout history deploy/market-web
REVISION CHANGE-CAUSE
2 <none>
3 <none>Revision 1 became revision 3. To go back further than one step:
learner@shallows:~$ kubectl rollout undo deploy/market-web --to-revision=2