Skip to content

Rolling Update

In one line

A rolling update gradually replaces old instances with new ones, ensuring zero downtime during deployment.

In simple words

A rolling update is a deployment strategy that updates your application gradually, one instance at a time, so there is always at least one healthy instance serving traffic. This means zero downtime during deployment.

For example, if you have 4 replicas and you update the image: Kubernetes creates 1 new Pod with the new version, waits for it to be ready, then removes 1 old Pod. It repeats this until all 4 Pods are running the new version.

You can control the speed: maxSurge (how many new Pods can be created above the desired count) and maxUnavailable (how many Pods can be unavailable during the update). If something goes wrong, you can roll back to the previous version.

This is the default strategy in Kubernetes Deployments.

Example

yaml
spec:
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1        # create at most 1 extra Pod
      maxUnavailable: 0   # never reduce capacity
  # ...
  # Update: kubectl set image deployment/app app=app:v2

This RollingUpdate strategy creates at most 1 extra Pod at a time and never reduces available capacity below the desired count.

How it works

  1. You update the container image in the Deployment.
  2. Kubernetes creates a new Pod with the new image.
  3. Once the new Pod is ready, an old Pod is removed.
  4. This repeats until all Pods are running the new version.

Common confusions

  • Confused with: Blue-Green Deployment

    The difference: A rolling update gradually replaces instances (mixed old/new during update); blue-green switches all traffic at once from old to new (no mixing, but needs double capacity).

Related terms

Decode error messages

Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.

View errors

← Back to glossary