Using a deployment strategy
Cloud Deploy supports two deployment strategies for GKE, Cloud Run, and GKE Enterprise:
- Standard: This is the default strategy. It deploys the new or changed application into the target runtime, fully replacing any previous version.
- Canary: This strategy incrementally deploys the changed application into the target runtime, gradually replacing the old version with the new one by configured percentages. This can be by the percentage of traffic or by the percentage of GKE pods.
In this section, we’ll configure and run a simple canary that replaces the old version with the new, first by 50%, then fully. The manifest we created at the beginning of this chapter specifies four replicas. The first phase of this canary will split them so that two replicas are running the old version and two are running the new version. Then, the last phase (which is always the stable
phase) will deploy the new version to all four replicas.