Two states make a Deployment look broken when it is not.
Paused
text
learner@shallows:~$ kubectl rollout pause deploy/market-web
deployment.apps/market-web paused
learner@shallows:~$ kubectl set image deploy/market-web nginx=nginx:1.26
deployment.apps/market-web image updated
learner@shallows:~$ kubectl get deploy market-web
NAME READY UP-TO-DATE AVAILABLE AGE
market-web 3/3 0 3 5mThe template says nginx:1.26. Every Pod still runs nginx:1.27. UP-TO-DATE 0 is the clue: no Pod has the current template. rollout status waits for ever and times out.
Pause is useful on purpose: change the image, the resources and a label, then roll them out as one revision:
text
learner@shallows:~$ kubectl rollout resume deploy/market-web
deployment.apps/market-web resumedCheck for it in the spec:
text
learner@shallows:~$ kubectl get deploy market-web -o yaml | grep paused
paused: trueScaled to zero
text
learner@shallows:~$ kubectl get deploy market-worker
NAME READY UP-TO-DATE AVAILABLE AGE
market-worker 0/0 0 0 5mreplicas: 0 is a valid wish. The Deployment is healthy and runs nothing. People scale to zero to turn an app off without deleting it, and then forget. kubectl scale --replicas=2 wakes it up.
PausedUP-TO-DATE 0 while READY is full · spec.paused: true · fix: rollout resume
Scaled to zeroREADY 0/0 · spec.replicas: 0 · fix: kubectl scale