Flux v2

CNCF Graduated GitOps tool. Originated at Weaveworks (the GitOps coiners). v2 rewrite from monolithic v1 to modular controllers (GOTK). Multi-tenant via K8s namespaces. Used at Mercedes-Benz, BMW, RingCentral, MOIA. Kustomize-first; tighter K8s-native than Argo CD.

Overview

Flux v2 and the GitOps Toolkit

Flux v2 is the Kubernetes-native (K8s-native) GitOps tool from Weaveworks, which coined the term GitOps in 2017. GitOps means the desired state of a cluster lives in Git, and software inside the cluster keeps the cluster matching it. v1 was the original implementation; v2 (released 2021) is a complete rewrite into the GitOps Toolkit (GOTK), a set of composable Kubernetes controllers. A controller is a loop that watches some resources and keeps acting until the cluster matches them. Flux graduated in the CNCF in November 2022, about a week before Argo CD.

The toolkit splits GitOps into separate jobs, one controller each. source-controller fetches from a Git repo, a Helm repo, an OCI registry or a bucket, and packages what it fetched as an artifact. kustomize-controller builds and applies Kustomize manifests from that artifact, and helm-controller installs and upgrades Helm charts from it. notification-controller takes webhooks in and sends alerts out. image-reflector watches registries, and image-automation commits new image tags back to Git.

Key concepts

  • GitRepository — source CRD
  • Kustomization — apply manifests
  • HelmRelease — Helm chart deployment
  • Multi-tenancy via namespaces
  • Notification controller — Slack/Webhook events
  • Recipe: flux bootstrap on EKS with multi-cluster

Interview questions

  • Walk through Flux v2 GOTK architecture — five controllers, each role.
  • How does Flux's multi-tenancy compare to Argo CD AppProjects?
  • How does Flux handle image automation (the GitOps for container images)?
  • Federated vs hub-and-spoke — when does each fit?
  • Quick-fire interview answers — Flux essentials.

Sign up free to read the full topic

More DevOps topics

Start free on Cariara · Coding problems · System design studio