Instead of shutting the old version down completely and installing a new one — with downtime while the swap happens — the system replaces instances gradually: some are already running the new version, some are still on the old one, and the service keeps responding without interruption. In Kubernetes this mechanism is built into a Deployment.
How it works in Kubernetes
A Deployment creates a new ReplicaSet and smoothly shifts the pod count: the new one grows while the old ones shrink, until every pod runs on the new template. Two parameters set the pace and the headroom during the update; they are written as a number or a percentage, and both default to 25%. With 4 replicas, the update keeps between 3 and 5 pods running:
| Parameter | What it controls | Example with 4 pods |
|---|---|---|
| maxSurge | how much the desired count may be exceeded — room for new pods | 1 → up to 5 pods run during the update |
| maxUnavailable | how many pods may fall short of the count — the cap on “retired” old pods | 1 → at least 3 pods answer at any moment |
Pods that are shutting down no longer count as available, and a new pod starts receiving traffic only after it passes the readiness check. The minReadySeconds parameter keeps each new pod “on probation”, while progressDeadlineSeconds (600 seconds by default) limits the controller’s patience: if there is no progress for that long, the Deployment is marked as stalled and the on-call engineer sees the problem.
Rollback and when the method fits
If the new version misbehaves, the previous ReplicaSet is kept, and the rollback is kubectl rollout undo — the same rolling process in reverse (you can also return to a specific revision with --to-revision). A rolling update suits stateless services where the old and new versions can run side by side; databases with schema changes need reversible, compatible migrations, while environment configuration changes are more often handled with a blue-green deployment.
Sources
the term is written from these pagesVerified 9 Nov