Why Flux

Why push-based CI deployment breaks down at scale, the four OpenGitOps principles Flux implements, and where Flux sits against Argo CD, plain CI pipelines, and Kustomize or Helm on their own.

Overview

What Flux is

Flux is an open and extensible continuous delivery solution for Kubernetes. It keeps clusters in sync with configuration sources and automates updates when new code is available.

It is a CNCF Graduated project (graduated November 2022) and originated at Weaveworks, the company that coined the term GitOps in 2017. The CNCF CI/CD Tech Radar lists it at the Adopt level.

The whole idea fits in one loop. Flux controllers run inside the cluster. On a set interval they pull configuration from a Git repository, an OCI registry, a Helm repository or an S3 bucket. They apply it to the cluster with server-side apply, then compare the cluster state with the source again on every interval. A manual edit that does not match the source is reverted on the next pass.

Key concepts

  • GitOps
  • The four OpenGitOps principles
  • Reconciliation
  • Pull model
  • GitOps Toolkit (GOTK)
  • Flux v1 versus Flux v2
  • Gitless GitOps

Interview questions

  • Why is pull-based GitOps considered more secure than a CI pipeline that runs kubectl apply?
  • Name the four GitOps principles and explain which ones most teams actually fail.
  • How does Flux relate to Helm and Kustomize? Does it replace them?
  • When would you NOT use Flux?
  • What is the difference between Flux v1 and Flux v2, and why does it matter for migration?

Sign up free to read the full topic

More DevOps topics

Start free on Cariara · Coding problems · System design studio