market-web in plains-1j6zau8 runs nginx:1.27 with 3 replicas. The container is named nginx.
Break the rollout
sh
kubectl set image deploy/market-web nginx=nginx:1.99-nope -n plains-1j6zau8
kubectl get pods -n plains-1j6zau8A new ReplicaSet appears and starts a Pod. That Pod cannot pull its image. Read its STATUS column; that word is an answer.
sh
kubectl rollout status deploy/market-web -n plains-1j6zau8
kubectl get rs -n plains-1j6zau8rollout status waits and times out. The three old Pods are still Running and still serving. The rollout is stuck, not down.
Roll back
sh
kubectl rollout undo deploy/market-web -n plains-1j6zau8
kubectl get pods -n plains-1j6zau8The broken Pod is gone, the image is nginx:1.27 again. Confirm:
sh
kubectl get deploy market-web -n plains-1j6zau8 -o jsonpath='{.spec.template.spec.containers[0].image}'Roll forward, with a reason
sh
kubectl annotate deploy market-web kubernetes.io/change-cause="downgrade to nginx 1.26 for the market" -n plains-1j6zau8
kubectl set image deploy/market-web nginx=nginx:1.26 -n plains-1j6zau8
kubectl rollout status deploy/market-web -n plains-1j6zau8
kubectl rollout history deploy/market-web -n plains-1j6zau8The last revision has a CHANGE-CAUSE. The revisions before it say <none>.