A recreate strategy stops every pod from the old ReplicaSet before starting pods from the new version. The application therefore experiences downtime, but the rollout is fast and avoids running multiple application versions simultaneously. section 5.1.2
Use this strategy when:
- The application cannot support multiple versions running together, such as when database locks create compatibility problems. section 5.1.2
- The fastest rollout is preferred and planned downtime is acceptable. section 5.1.2
- Set spec.strategy.type to Recreate and remove rollingUpdate, maxSurge, and maxUnavailable fields. section 5.1.2
Configure and verify a recreate rollout
Edit the Deployment with kubectl edit deploy apache, change the strategy type from RollingUpdate to Recreate, and remove the rolling-update fields. Use kubectl explain deploy.spec.strategy when checking valid YAML fields. section 5.1.2
Figure 5.9 The update process for a Deployment when deleting and creating new replicas
Follow the update sequence showing old replicas being deleted before new replicas are created. section 5.1.2


