Kubernetes Rolling Restart: What It Is and How To Use It

Kubernetes Rolling Restart: What It Is and How To Use It

When managing applications on Kubernetes, sometimes you need to restart your pods — maybe to pick up new config changes (like a refreshed ConfigMap or Secret), or to recover from a transient issue — without causing downtime.

That’s where a Rolling Restart comes in

A Rolling Restart updates pods one at a time so your app stays available throughout the process. The main reason is to avoid downtime.

How to perform a Rolling Restart

You can easily trigger a rolling restart of a Deployment with this command:

kubectl rollout restart deployment <deployment-name>

What happens:

✅ Kubernetes restarts pods gradually

✅ Ensures that new pods are ready before terminating old ones

✅ Maintains availability

How to check that is working:

kubectl rollout status deployment <deployment-name>

When should be used

Why not just delete the pods?

You could, but deleting pods directly (via kubectl delete pods) doesn’t respect readiness checks or availability — it can cause downtime if you're not careful. Rolling Restart is the safe, Kubernetes-native way.

How to Roll Back,in case something goes wrong with the new configuration ?

See Kubernetes Roll Back