Flux CD
The GitOps toolkit for keeping Kubernetes clusters in sync with Git
Flux is a set of continuous delivery controllers that keep Kubernetes clusters in sync with sources of configuration such as Git repositories, Helm repositories, and OCI registries. Deployments become a matter of merging a pull request rather than running imperative commands against a cluster.
How it works
Flux runs as a handful of controllers inside your cluster. Each one does a single job: one fetches sources, one applies Kubernetes manifests, one manages Helm releases, and so on. They communicate through Kubernetes custom resources, so everything you configure is itself YAML you can store in Git. Flux can even manage its own installation: the flux bootstrap command commits Flux’s manifests to your repository and then syncs from them.
Core concepts
- Source — where the desired state is stored: a
GitRepository,HelmRepository,OCIRepository, orBucket. Source objects fetch and cache an artifact for other controllers to use. - Kustomization — Flux’s own resource that tells the cluster which path of a source to apply, how often, and with what options (prune, health checks, dependencies). Not to be confused with Kustomize’s
kustomization.yaml, which Flux can also build. - HelmRelease — installs and upgrades a Helm chart from a Helm repository, Git repository, or OCI registry, with full release lifecycle handling.
- Reconciliation — the loop in which a controller compares what Git declares with what is running and corrects the difference. It runs on an interval and on demand.
- Bootstrap — installs Flux into a cluster and wires it to a Git repository so Flux manages itself.
- Controllers — source, kustomize, helm, notification, and the optional image-reflector and image-automation controllers.
Why teams adopt GitOps with Flux
- Auditable by default. Every change to the cluster has a commit and, typically, a reviewed pull request.
- Easy rollback. Reverting a deployment is a
git revert, not a manualkubectlintervention under pressure. - Composable. Install only the controllers you need and scale them independently.
- Built for platform teams. Native SOPS secret decryption, multi-tenancy through Kubernetes RBAC, OCI artifacts, and automated image updates are part of the toolkit.
- Drift correction. Changes made directly against a cluster are reverted at the next reconciliation.
Getting started
Install the flux CLI, bootstrap Flux into a cluster against a Git repository, and add a GitRepository and a Kustomization that point at your manifests (plain YAML, a Kustomize overlay, or a Helm chart). The guides below walk through the most common setups, from a single application to multiple clusters and tenants. They were written against Flux 2.9; check the Flux documentation for the version you install.