RollingUpdate (Default)
The RollingUpdate strategy will gracefully rollout new versions of your application and automatically rollback if the new version fails to start. This is the recommended strategy as it avoids downtime and load spikes during deployments.
How it works
When using RollingUpdate:- New pods are created with the new version
- Once the new pods are ready, traffic is gradually shifted to them
- Old pods are terminated only after new pods are healthy
- If new pods fail to start, the deployment automatically rolls back
Recreate
The Recreate strategy will stop all current versions and create new ones once all old ones have been shutdown.
How it works
When using Recreate:- All existing pods are terminated
- The system waits for all old pods to shut down completely
- New pods are created with the new version
- Service becomes available once new pods are ready
When to use Recreate
Use the Recreate strategy when:- Your application cannot run multiple versions simultaneously
- You have breaking changes that are incompatible with the old version
- You’re deploying to development or test environments where downtime is acceptable
- Your application manages state that cannot be shared between versions