Prompt
Do I need Kubernetes for rolling restarts and zero downtime?
Latest observation
No — you do not need Kubernetes specifically for rolling restarts or zero downtime.
What you need is the ability to run multiple instances of your app and to shift traffic gradually so at least one healthy instance remains serving requests while others restart.
Common ways to achieve it
1. Load balancer + multiple app instances
Run 2+ app servers behind a load balancer:
- take one instance out of rotation
- restart/update it
- wait until it’s healthy
- put it back
- repeat for the next instance
This works on:
- bare metal
- VMs
- Docker Compose
- ECS / Nomad / systemd fleets
- Kubernetes
2. Blue/green deployment
Keep two environments:
- blue = current live version
- green = new version
Deploy to green, test it, then switch traffic over. This gives near-zero downtime and easy rollback.
3. Rolling update in any orchestrator
Kubernetes has built-in rolling updates, but so do other platforms and custom scripts.
What Kubernetes adds
Kubernetes makes this easier because it provides:
- rolling deployments
- readiness/liveness probes
- service discovery
- autoscaling
- self-healing
But it’s not required.
Important caveat
If you only have one app instance, you cannot do true zero-downtime restarts for that same process, regardless of Kubernetes. You need redundancy.
Practical rule
If you need:
- one machine, one process → restarts will usually cause downtime
- multiple instances + traffic routing → you can get rolling restarts and near-zero downtime
- automation at scale → Kubernetes helps, but is optional
If you want, I can also show you how to do zero-downtime deploys with:
- Docker Compose
- Nginx + two app instances
- systemd
- Kubernetes