Skip to content
Optimal Lab

DevOps · interactive

Kubernetes rolling deploys

A rolling update swaps pods one at a time, and only sends traffic to a new pod once its readiness probe passes. Roll out a good version, then a broken one, and watch the old pods keep serving.

Deployment “web” · replicas 4

progressing

Service traffic

v1 100%

Only Ready pods get requests. 4 of 4 pods are Ready.

  • v1-1v1

    Ready

  • v1-2v1

    Ready

  • v1-3v1

    Ready

  • v1-4v1

    Ready

Tick 0: 4 pods of v1 are Ready and serving.

New version

maxSurge

maxUnavailable 0 · tick 0
  1. 1

    maxSurge lets the Deployment run up to 5 pods for a moment, so it never has to stop an old one first.

    0 v2 pods created so far.

  2. 2

  3. 3

  4. 4

  5. 5