Skip to content

The rolling update

A Deployment rollout replaces Pods gradually: maxSurge new Pods above desired, maxUnavailable below, until all are new.

Rolling update

  1. Set the strategy

    strategy.type: RollingUpdate. Default maxSurge: 25%, maxUnavailable: 25%. Lower values = safer but slower.

  2. Readiness probe mandatory

    Without a readinessProbe, Kubernetes considers a new Pod ready immediately and shifts traffic before the app booted.

  3. Liveness probe for restarts

    If the app hangs, livenessProbe fails and Kubernetes restarts it. Never share readiness and liveness endpoints.

  4. Rollback ready

    kubectl rollout undo deployment/app. Uses the revisionHistoryLimit (default 10) retained ReplicaSets.