Flagger — Progressive Delivery Operator for Kubernetes
Flagger is a FluxCD progressive delivery operator that automates canary, A/B, and blue/green rollouts on Kubernetes, using service-mesh traffic shifting and metric-based analysis to promote or abort releases.
What it is
Flagger is a FluxCD progressive delivery operator for Kubernetes. It automates canary, A/B, and blue/green rollouts by shifting traffic gradually to new versions, analyzing metrics, and automatically promoting or aborting releases. Flagger works with Istio, Linkerd, App Mesh, NGINX, Contour, and other service meshes.
Flagger targets platform teams and SREs who want safe, automated deployments on Kubernetes. Instead of deploying new versions at 100% and hoping nothing breaks, Flagger tests new versions with a small percentage of traffic first.
How it saves time or tokens
Manual canary deployments require writing custom scripts, monitoring dashboards, and making promotion decisions. Flagger automates the entire process: it creates canary resources, shifts traffic incrementally, queries Prometheus for success metrics, and either promotes or rolls back automatically. Failed deployments are caught and reverted before they affect all users.
How to use
- Install Flagger with Helm:
helm repo add flagger https://flagger.app
helm upgrade -i flagger flagger/flagger \
--namespace linkerd \
--set meshProvider=linkerd
- Define a Canary resource:
apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
name: my-app
spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: my-app
service:
port: 80
analysis:
interval: 30s
threshold: 5
maxWeight: 50
stepWeight: 10
metrics:
- name: request-success-rate
thresholdRange:
min: 99
interval: 30s
- Deploy a new version by updating the Deployment image. Flagger detects the change and starts the canary analysis automatically.
Example
# Watch Flagger canary progress
kubectl get canary my-app -w
# Check canary status
kubectl describe canary my-app
# Output shows traffic weight progression:
# Advance my-app.default canary weight 10
# Advance my-app.default canary weight 20
# Advance my-app.default canary weight 30
# Promotion completed! my-app.default
Related on TokRepo
- DevOps Tools — Deployment and infrastructure automation
- Monitoring Tools — Metrics and observability for deployments
This tool integrates with standard development workflows and requires minimal configuration to get started. It is available as open-source software with documentation and community support through the official repository. The project follows semantic versioning for stable releases.
For teams evaluating this tool, the key advantage is reducing manual work in repetitive tasks. The automation provided by the built-in features means less custom code to maintain and fewer integration points to manage. This translates directly to lower maintenance costs and faster iteration cycles.
Common pitfalls
- Flagger requires a service mesh or ingress controller for traffic splitting; it cannot work with bare Kubernetes Services alone.
- Prometheus must be configured to scrape your application metrics; without metrics, Flagger cannot make promotion decisions and will time out.
- The canary analysis interval and step weight need tuning for your application; too aggressive settings can promote bad releases, while too conservative settings slow down deployments.
Frequently Asked Questions
Flagger works with Istio, Linkerd, App Mesh, NGINX Ingress, Contour, Gloo, Traefik, Open Service Mesh, and Kuma. Each mesh has a specific provider configuration for traffic shifting.
Flagger queries Prometheus for metrics like request success rate and latency at each analysis interval. If metrics meet the threshold, traffic weight increases by the step weight. If metrics fail, Flagger rolls back the canary to the previous version.
Yes. Flagger supports A/B testing based on HTTP headers, cookies, or query parameters. You can route specific user segments to the canary version while the rest see the primary version.
Yes. In blue/green mode, Flagger runs both versions simultaneously and switches traffic all at once after the analysis passes, rather than incrementally shifting weight.
Yes. Flagger is a FluxCD project maintained under the Flux ecosystem. It works standalone but integrates well with Flux GitOps workflows for fully automated deployment pipelines.
Citations (3)
- Flagger GitHub— Flagger automates canary, A/B, and blue/green rollouts on Kubernetes
- Flagger Documentation— Flagger supports Istio, Linkerd, NGINX, and other service meshes
- FluxCD Official Site— Flagger is a FluxCD progressive delivery project
Related on TokRepo
Discussion
Related Assets
NAPI-RS — Build Node.js Native Addons in Rust
Write high-performance Node.js native modules in Rust with automatic TypeScript type generation and cross-platform prebuilt binaries.
Mamba — Fast Cross-Platform Package Manager
A drop-in conda replacement written in C++ that resolves environments in seconds instead of minutes.
Plasmo — The Browser Extension Framework
Build, test, and publish browser extensions for Chrome, Firefox, and Edge using React or Vue with hot-reload and automatic manifest generation.