Flagger logo

Flagger

Progressive delivery automation for Kubernetes with canary deployments

Flagger automates progressive delivery on Kubernetes by gradually shifting traffic to new versions while measuring metrics, running tests, and supporting canary, A/B, and blue/green strategies.

Flagger banner

Overview

Automate Safe Kubernetes Deployments

Flagger is a Cloud Native Computing Foundation progressive delivery tool that reduces production risk by automating the release process for Kubernetes applications. Instead of deploying new versions all at once, Flagger gradually shifts traffic while continuously measuring application metrics and running conformance tests.

Deployment Strategies and Integrations

Flagger supports canary releases, A/B testing, blue/green deployments, and traffic mirroring. It integrates with major service meshes (Istio, Linkerd, App Mesh, Kuma, OSM), ingress controllers (NGINX, Contour, Traefik, Gloo), and monitoring solutions. The tool tracks ConfigMaps and Secrets, automatically triggering analysis when configuration or code changes.

GitOps-Native Progressive Delivery

As part of the Flux family of GitOps tools, Flagger uses a declarative Canary custom resource to define deployment strategies, metric thresholds, webhooks for testing, and alerting rules. It creates and manages Kubernetes deployments, services, and routing objects automatically, synchronizing both container images and configuration during promotions. Teams can set traffic increment steps, success rate thresholds, latency limits, and custom metrics to ensure safe, automated rollouts.

Highlights

Automated canary, A/B testing, and blue/green deployment strategies with gradual traffic shifting
Built-in metrics analysis with Prometheus integration and custom metric template support
Webhook-driven conformance and load testing during rollout with automatic rollback on failure
Native integration with service meshes, ingress controllers, and GitOps workflows

Pros

  • Reduces production risk through automated, metrics-driven progressive delivery
  • Supports multiple deployment strategies and integrates with major Kubernetes networking tools
  • Declarative configuration via custom resources fits GitOps workflows
  • Tracks configuration changes (ConfigMaps, Secrets) alongside code deployments

Considerations

  • Requires Kubernetes and familiarity with service mesh or ingress controller concepts
  • Feature availability varies by provider (e.g., A/B testing limited to specific meshes)
  • Additional complexity in cluster architecture with extra deployments and services
  • Learning curve for configuring metric thresholds and analysis parameters

Managed products teams compare with

When teams consider Flagger, these hosted platforms usually appear on the same shortlist.

Hypertune logo

Hypertune

Type-safe feature flags platform with A/B testing, analytics, and app configuration optimized for TypeScript

LaunchDarkly logo

LaunchDarkly

Feature flag management platform for safe software releases with targeting, experimentation, and rollback capabilities

Reflag logo

Reflag

Feature flags and A/B testing for TypeScript

Looking for a hosted option? These are the services engineering teams benchmark against before choosing open source.

Fit guide

Great for

  • Teams practicing GitOps and seeking automated, safe Kubernetes deployments
  • Organizations using service meshes or ingress controllers for traffic management
  • Applications requiring gradual rollouts with metrics validation and automated rollback
  • Production environments where deployment risk mitigation is critical

Not ideal when

  • Simple applications without Kubernetes or where manual deployments suffice
  • Environments lacking monitoring infrastructure for metrics-based analysis
  • Teams unfamiliar with Kubernetes operators and custom resource definitions
  • Use cases requiring deployment strategies beyond traffic-based progressive delivery

How teams use it

Canary Deployment with Automated Rollback

Gradually shift 5% traffic increments to a new version, automatically rolling back if request success rate drops below 99% or latency exceeds thresholds

A/B Testing with Header-Based Routing

Route users with specific headers or cookies to a new application version for controlled feature testing before full rollout

Blue/Green Deployment with Load Testing

Deploy a new version alongside the current one, run automated load tests via webhooks, then switch traffic instantly upon success

Configuration Change Validation

Automatically trigger canary analysis when ConfigMaps or Secrets change, ensuring configuration updates are validated with the same rigor as code

Tech snapshot

Go92%
Shell8%
Mustache1%
Makefile1%
Smarty1%
Dockerfile1%

Tags

istiokubernetesgitopsprogressive-deliverygloocanarylinkerdnginxaws-appmeshcontourab-testing

Frequently asked questions

What Kubernetes components does Flagger require?

Flagger requires a Kubernetes cluster and optionally integrates with service meshes (Istio, Linkerd, App Mesh, Kuma, OSM), ingress controllers (NGINX, Contour, Traefik, Gloo), or the Gateway API. Monitoring with Prometheus is recommended for metrics analysis.

How does Flagger decide to promote or rollback a deployment?

Flagger measures metrics like request success rate and latency at defined intervals during traffic shifting. If metrics exceed thresholds for a configured number of checks, it rolls back automatically. Webhooks can run conformance or load tests to further validate deployments.

Can Flagger handle both code and configuration changes?

Yes. Flagger tracks ConfigMaps and Secrets referenced by deployments and triggers canary analysis when they change, synchronizing both container images and configuration during promotion.

What deployment strategies does Flagger support?

Flagger supports canary releases (weighted traffic shifting), A/B testing (header/cookie-based routing), blue/green deployments (traffic switch), and traffic mirroring. Strategy availability depends on the service mesh or ingress provider.

Is Flagger part of a larger ecosystem?

Yes. Flagger is a Cloud Native Computing Foundation project and part of the Flux family of GitOps tools, designed to integrate with declarative, Git-driven Kubernetes workflows.

Project at a glance

Active
Stars
5,243
Watchers
5,243
Forks
781
LicenseApache-2.0
Repo age7 years old
Last commit2 weeks ago
Primary languageGo

Last synced 3 hours ago