➤ Rolling Update

$ kubectl set image deployment/nginx-deployment nginx=nginx:1.25-alpine

$ kubectl get pods

$ kubectl get replicasets

$ kubectl rollout status deployment/nginx-deployment

$ kubectl rollout history deployment/nginx-deployment

$ kubectl annotate deployment nginx-deployment kubernetes.io/change-cause="Update to Nginx version 1.25-alpine"

$ kubectl rollout history deployment/nginx-deployment --revision 2


➤ Rolling Back

$ kubectl rollout undo deployment nginx-deployment --to-revision=1

$ kubectl rollout status deployment/nginx-deployment

$ kubectl set image deployment/nginx-deployment nginx=nginx:0.0.0.0

$ kubectl get pods

$ kubectl rollout status deployment/nginx-deployment


[LINKS]
https://semaphoreci.com/blog/kubernetes-rolling-update-deployment
