Using Recreate Strategy with Standard Kubernetes Deployments
This lesson discusses the recreate strategy and how to use it. At the end of lesson we see if the recreate strategy has fulfilled our needs.
We'll cover the following
- Changing deployment to Recreate strategy
- Pushing the changes and observing the outcome
- Checking the Pods
- Inspecting the description of the deployment
- Why is Ingress missing and how to fix it?
- Inspecting behavior before and after a new release is deployed
- What did we observe?
- The recreate deployments strategy
- Does recreate strategy fulfill our needs?
- Conclusion
Previously, most applications were deployed with what today we call the recreate strategy which we will discuss shortly. For now, we’ll focus on implementing it and observing the outcome.
Changing deployment to Recreate
strategy
By default, Kubernetes Deployments use the RollingUpdate
strategy. If we do not specify any, that’s the one that is implied. We’ll get to that one later. For now, what we need to do is add the strategy
into the deployment.yaml
file that defines the deployment.
Get hands-on with 1400+ tech skills courses.