Skip to content

Rolling Updates & Rollbacks in Deployments

Deployments ensure zero downtime during application upgrades using controlled Rolling Updates.


  • maxSurge: The maximum number of Pods that can be created above the desired replica count during an update (e.g., 25% or 1).
  • maxUnavailable: The maximum number of Pods that can be unavailable during the update process (set to 0 to guarantee zero dropped requests).

Terminal window
# Trigger an image update
kubectl set image deployment/web-app web-server=nginx:1.26-alpine --record
# Track rollout status
kubectl rollout status deployment/web-app
# View revision history
kubectl rollout history deployment/web-app
# Roll back to the immediately preceding version
kubectl rollout undo deployment/web-app
# Roll back to a specific revision
kubectl rollout undo deployment/web-app --to-revision=2