Hands-on Lab·Kubernetes and Cloud Native Associate
Progressive Delivery and Automated Rollback
A Deployment gives you one rollout strategy and no opinion about whether the new version is any good. Replace it with a Rollout that shifts 20% of traffic, asks Prometheus whether to continue, and reverses itself when the new image cannot run.
Delivery and GitOps Guide 46 of 46 Intermediate
- Kubernetes1.36.4
- Cluster4 nodes
- Runtimecontainerd 2.2.6
- CNICalico v3.32.1
- TimeAbout 20 min
Argo Rollouts is a CNCF incubating project and its CRDs are still v1alpha1. The step and analysis fields used here have been stable across 1.x.
- Argo Rollouts1.9.1
- Prometheus3.14.0
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| CKA1001 | 192.168.0.175 | Ubuntu 26.04 LTS | Control Plane Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE01 | 192.168.0.176 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE02 | 192.168.0.177 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE03 | 192.168.0.178 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when a new version has to prove itself against real traffic before it takes all of it. This matters because a Deployment offers one rollout strategy and no opinion about whether the new version is any good - progressive delivery adds the gate that decides.
- installing the Argo Rollouts controller with its Rollout and AnalysisTemplate CRDs
- shifting twenty percent of traffic to a canary and reading the rollout's step state
- watching an analysis step query Prometheus and gate promotion on the answer it gets
- promoting past a
pause: {}step that would otherwise wait forever - setting an image tag that cannot run, and watching the rollout stop instead of proceeding
Before you start
- A working Prometheus in the monitoring namespace, for the analysis step.
- The rolling-update guide, since the whole point here is what a Deployment cannot do.
-
Install the controller, and meet the first surprise
-
Twenty percent first
-
The gate asks Prometheus
-
Promote, and what one promote actually does
-
A version that cannot run