A deployment strategy is a way to change or upgrade an application. The aim is to make the change without downtime in a way that the user barely notices the improvements.
Because the end user usually accesses the application through a route handled by a router, the deployment strategy can focus on DeploymentConfig
object features or routing features. Strategies that focus on the deployment impact all routes that use the application. Strategies that use router features target individual routes.
Many deployment strategies are supported through the DeploymentConfig
object, and some additional strategies are supported through router features. Deployment strategies are discussed in this section.
Choosing a deployment strategy
Consider the following when choosing a deployment strategy:
-
Long-running connections must be handled gracefully.
-
Database conversions can be complex and must be done and rolled back along with the application.
-
If the application is a hybrid of microservices and traditional components, downtime might be required to complete the transition.
-
You must have the infrastructure to do this.
-
If you have a non-isolated test environment, you can break both new and old versions.
A deployment strategy uses readiness checks to determine if a new pod is ready for use. If a readiness check fails, the DeploymentConfig
object retries to run the pod until it times out. The default timeout is 10m
, a value set in TimeoutSeconds
in dc.spec.strategy.*params
.
modules/deployments-rolling-strategy.adoc modules/deployments-canary-deployments.adoc modules/deployments-creating-rolling-deployment.adoc modules/odc-starting-rolling-deployment.adoc