Type of Upgrades for Deployments in Kubernetes
Planted .
There are two ways to do upgrades for deployments in Kubernetes:
- Rolling upgrades - default
- Recreate
Recreate
All existing pods are killed before new pods are created.
Rolling Upgrades
It replaces some pods at a time (controlled via maxUnavailable and maxSurge).
maxUnavailable specifies the max number of pods that can be unavailable during an upgrade. It can be a number (like 2) or a percentage (like 25%)
maxSurge specifies the max number of pods that can be created during the upgrade. It can be a number of a percentage.
Default value for both is 25%.