Next two days, lets have a look at deployment strategies. Not much choice here, but on day #17 we will have a look at the recreate strategy.
The recreate strategy is simplest thing you can do. It first stops all the pods and then starts the new version of application.
The strategy’s only param is timeoutSeconds , which is time to wait until the readiness check succeeds in the pod. Since we talk about it, always define readiness and health checks for your pods for OpenShift to know about the application state.
Other two fields visible in the strategy are:
- activeDeadlineSeconds – how long can the deployment pod itself live
- resources – limits and requests on resources used by pods. For example you can declare how much cpu and memory is used by the deploy pod.
The commands were executed using minishift and the following client/server versions of OpenShift.
Thanks for reading the OpenShift morsels. To get updates about new articles, you can sign up to the newsletter below.
As a thank you message, you will also get access to OpenShift CLI CheatSheet listing most commonly used commands together with a short explanation.