aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • Software Engineering
  • Tools

Keep Calm And Trust A/B Testing With Flux, Flagger, And Linkerd

  • aster.cloud
  • July 26, 2022
  • 4 minute read

At GitOps Days 2022, Jason Morgan, Technical Evangelist at Buoyant and co-chair of the CNCF Business Value Subcommittee, demonstrated how to make Flux, Flagger, and Linkerd work together. He also showed an example of using an ingress to do A/B testing based on headers or cookies. Jason talked through the theory and whiteboarded for those who prefer visualizing these scenarios. The presentations include everything you need to know, to do this on your own.

Before we get too deep in the technical weeds of the demos, let’s give you a brief overview of the tools and what they do.


Partner with aster.cloud
for your next big idea.
Let us know here.



From our partners:

CITI.IO :: Business. Institutions. Society. Global Political Economy.
CYBERPOGO.COM :: For the Arts, Sciences, and Technology.
DADAHACKS.COM :: Parenting For The Rest Of Us.
ZEDISTA.COM :: Entertainment. Sports. Culture. Escape.
TAKUMAKU.COM :: For The Hearth And Home.
ASTER.CLOUD :: From The Cloud And Beyond.
LIWAIWAI.COM :: Intelligence, Inside and Outside.
GLOBALCLOUDPLATFORMS.COM :: For The World's Computing Needs.
FIREGULAMAN.COM :: For The Fire In The Belly Of The Coder.
ASTERCASTER.COM :: Supra Astra. Beyond The Stars.
BARTDAY.COM :: Prosperity For Everyone.

What is Linkerd?

Linkerd is an ultra-light, ultra-simple, and ultra-powerful service mesh for Kubernetes. It makes running services easier and safer by giving you runtime debugging, observability, reliability, and security—all without requiring any changes to your code. Linkerd is fully open source and the only graduated service mesh project in the Cloud Native Computing Foundation (CNCF).

How does Linkerd work?

Linkerd works by installing a set of lightweight, transparent micro-proxies next to each service instance. These proxies automatically handle all traffic between services. Because they’re transparent, these proxies act as highly instrumented out-of-process network stacks, sending telemetry to, and receiving control signals from, the control plane. This design allows Linkerd to measure and manipulate traffic to and from your service without excessive latency.

What is Flagger?

Flagger is a progressive delivery tool that automates the release process for applications running on Kubernetes. It reduces the risk of introducing a new software version in production by gradually shifting traffic to the new version while measuring metrics and running conformance tests. Flagger is a CNCF project and part of the Flux family of GitOps tools.

Read More  Document AI For Government Makes It Easier To Process Documents And Deliver Better Constituent Services

How does Flagger work?

Flagger implements several deployment strategies (Canary releases, A/B testing, Blue/Green mirroring) using a service mesh or an ingress controller for traffic routing. For release analysis, Flagger can query Prometheus, InfluxDB, Datadog, New Relic, CloudWatch, Stackdriver, or Graphite. And for alerting, it uses Slack, MS Teams, Discord, and Rocket. Flagger can be configured with Kubernetes custom resources and is compatible with any CI/CD solutions made for Kubernetes. Since Flagger is declarative and reacts to Kubernetes events, it can be used in GitOps pipelines with tools like Flux, JenkinsX, Carvel, Argo, etc. To learn more about how it works, read the docs.

Stop Worrying and use A/B Testing

Now that you’ve got a basic understanding of Linkerd and Flagger, let’s get into Jason’s demos to learn how to keep calm and trust A/B testing. Because Flagger allows for different rollouts with either your service mesh or ingress, Jason shows two demos in his talks, one for header-based routing with Nginx and the other one for weight-based routing with Linkerd.

Header-Based Routing with Nginx:

Jason starts by showing his current setup and a whiteboard image of his Kubernetes cluster, which shows a generator and two primary pods running the podinfo application (created by Stefan Prodan for testing and workshops). He then changes the application, saves, git commits, and pushes it, then forces Flux to reconcile this change (this is for the sake of the demo, Flux does this automagically without a forced reconciliation). Flagger is watching this deployment and sees an incoming change and spins up two new pods with the latest versions of the app (which start receiving test traffic).  Because this demo shows header-based routing, the standard user won’t get the traffic routing and see the new application. Jason changes his header and shows the application automatically updating with the new change (in this case, it’s a simple logo change). Jason returns his headers to a standard user and waits for the last step, which is the canary validation.

Read More  How Organizations Can Rethink Their Approach To Time Management Coaching

The traffic shift is illustrated in the Flagger Canary Stages image below:

Traffic shift in the Flagger Canary Stages

While Nginx is setting where the traffic is going and handling the routing, Linkerd is providing the metrics that power Flagger’s decisions on whether to move forward with the canary rollout. You can see that the validation was successful because Flux and Flagger automatically begin terminating the pods with the old app versions. Jason also notes that when you’re integrating Nginx with Linkerd, there’s a cool feature called set service-upstream. Nginx, by default, is going to try and route to individual pods in a service. With the set service upstream value, you can tell Nginx to default routing to the Kubernetes service instead of a particular ingress. This allows Nginx to play seamlessly well with Linkerd in your environment. You won’t have to do any configuration to Nginx or Linkerd to tell them to work together, you just add the proxy, and everything behaves as normal.

Weight-based Routing with Linkerd:

In the second demo, Jason starts by modifying the canary deployment to comment out header-based routing and making it weight-based instead (with maxWeight and stepWeight settings). He then pushes the canary but still needs to change the (logo in the) app; he Git pushes the change, and when Flux reconciles that change, a percentage of traffic is routed to the new version of the app. Now we see Flagger spinning up the new deployment with the new pod versions. Once the success criteria have been met, it takes the old deployment (which still has however many pods of the old version), deploys the new version of the app, turns off the old versions, shifts traffic back, and deletes the canary version.

Read More  Notta vs Fireflies: Which AI Transcription Tool Deserves Your Attention in 2025?

According to Jason what you get with both examples “is a lot of power with very little work.” It’s clear how much the Linkerd and Flagger communities have researched the needs of the market and deployment patterns in the wild. Both make it easy to implement best practices without getting lost and to integrate with all the other Cloud Native tooling you and your organization need.

Here’s the video in its entirety if you’d like to watch it from start to finish

Next Steps

Check out the Linkerd Getting Started docs and if you have questions, visit the Linkerd Slack.  If you’d like to follow along or try these demos out for yourself, check out Jason’s repository, or visit the Flagger Docs for Linkerd Canary Deployments and other tutorials. If you have questions or need help, reach out on CNCF Slack in the #flux and #flagger channels.

Did you miss the GitOps Days conference? No worries, you can watch all sessions on-demand at the GitOps Days 2022 Playlist.

 

By Stacey Potter
Source CNCF


For enquiries, product placements, sponsorships, and collaborations, connect with us at [email protected]. We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

aster.cloud

Related Topics
  • A/B Testing
  • CNCF
  • Flagger
  • Flux
  • GitOps Days 2022
  • Kubernetes
  • Linkerd
You May Also Like
notta-ai-header
View Post
  • Featured
  • Tools

Notta vs Fireflies: Which AI Transcription Tool Deserves Your Attention in 2025?

  • May 16, 2025
View Post
  • Software Engineering
  • Technology

Claude 3.7 Sonnet and Claude Code

  • February 25, 2025
View Post
  • Engineering
  • Software Engineering

This Month in Julia World

  • January 17, 2025
View Post
  • Engineering
  • Software Engineering

Google Summer of Code 2025 is here!

  • January 17, 2025
zedreviews-Apple-iPhone-16-Pro-finish-lineup-240909
View Post
  • Featured
  • Gears
  • Tech
  • Technology
  • Tools

Apple debuts iPhone 16 Pro and iPhone 16 Pro Max

  • September 10, 2024
zedreviews-Apple-AirPods-Active-Noise-Cancellation-240909
View Post
  • Featured
  • Gears
  • Tech
  • Technology
  • Tools

Apple introduces AirPods 4 and the world’s first all-in-one hearing health experience with AirPods Pro 2

  • September 10, 2024
View Post
  • Software Engineering

5 Books Every Beginner Programmer Should Read

  • July 25, 2024
Ruby
View Post
  • Software Engineering

How To Get Started With A Ruby On Rails Project – A Developer’s Guide

  • January 27, 2024

Stay Connected!
LATEST
  • 1
    Pure Accelerate 2025: All the news and updates live from Las Vegas
    • June 18, 2025
  • 2
    ‘This was a very purposeful strategy’: Pure Storage unveils Enterprise Data Cloud in bid to unify data storage, management
    • June 18, 2025
  • What is cloud bursting?
    • June 18, 2025
  • 4
    There’s a ‘cloud reset’ underway, and VMware Cloud Foundation 9.0 is a chance for Broadcom to pounce on it
    • June 17, 2025
  • What is confidential computing?
    • June 17, 2025
  • Oracle adds xAI Grok models to OCI
    • June 17, 2025
  • Fine-tune your storage-as-a-service approach
    • June 16, 2025
  • 8
    Advanced audio dialog and generation with Gemini 2.5
    • June 15, 2025
  • 9
    A Father’s Day Gift for Every Pop and Papa
    • June 13, 2025
  • 10
    Global cloud spending might be booming, but AWS is trailing Microsoft and Google
    • June 13, 2025
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • Google Cloud, Cloudflare struck by widespread outages
    • June 12, 2025
  • What is PC as a service (PCaaS)?
    • June 12, 2025
  • 3
    Crayon targets mid-market gains with expanded Google Cloud partnership
    • June 10, 2025
  • By the numbers: Use AI to fill the IT skills gap
    • June 11, 2025
  • 5
    Apple services deliver powerful features and intelligent updates to users this autumn
    • June 11, 2025
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.