Deployment Strategy
There are two types of deployment strategy.
- Recreate
- Rolling update
Recreate strategy
This strategy involves deleting all the pods and then recreating new pods with the update. It has a downside of application downtime when the update is happening.
Rolling update
This strategy updates the pods one by one so that the application is still accessible for the users. This is the by default strategy used for deployment updates.
We can specify deployment strategy in deployment yaml file as follows.
...
spec:
strategy:
type: RollingUpdate # or Recreate
...