Progressive Delivery with Flagger
You'll learn how to safely roll out new application versions using automated canary deployments and A/B testing with Flagger integrated into your Flux GitOps workflow.
What is Flagger?
Flagger is a progressive delivery operator that automates the promotion of canary deployments based on metrics and testing. Think of it as a careful quality inspector on an assembly line—it gradually shifts traffic to your new version while continuously checking health metrics, rolling back automatically if something goes wrong.
When integrated with Flux, Flagger watches for new image versions deployed by Flux and orchestrates the rollout strategy you've defined in Git.
How Flagger Works with Flux
Flux handles the "what should be deployed" (syncing manifests from Git), while Flagger handles the "how to deploy it safely" (gradual traffic shifting and automated validation).
Here's the flow:
- Flux detects a new container image or manifest change
- Flagger creates a canary deployment alongside your stable version
- Traffic gradually shifts (e.g., 5%, 10%, 25%, 50%, 100%) based on your configured steps
- At each step, Flagger runs metric checks (error rates, latency, custom metrics)
- If metrics pass, progression continues; if they fail, automatic rollback occurs
Canary vs A/B Testing
Canary deployments gradually shift traffic from old to new based on success metrics—like testing water temperature before diving in.
A/B testing routes specific user segments (headers, cookies) to different versions simultaneously to compare behavior—like serving two restaurant menus to different tables to see which sells better.
Key Takeaway: Flagger extends Flux with automated, metrics-driven progressive delivery, enabling safe production rollouts through canary deployments and A/B testing orchestrated entirely through GitOps principles.