Flux CD Explained: GitOps With Small Controllers

Flux CD Explained: GitOps With Small Controllers

Flux CD explained in one sentence: it is a set of small Kubernetes controllers that watch a Git repository and continuously make your cluster match what is committed there. Should you use it? If your team is comfortable with Kubernetes custom resources and wants GitOps without a central application server or a dashboard, yes — Flux behaves like a native extension of Kubernetes itself, and it stays out of your way once it is running.

Flux began at Weaveworks in 2016 as one of the first GitOps tools, and the project was rebuilt as Flux v2 — the GitOps Toolkit — which reached general availability in July 2023. It is a CNCF Graduated project, and it has been maintained by its community since Weaveworks closed in 2024. The rebuild matters: where the original Flux was a single operator, v2 splits the job into composable controllers, each owning one concern, so you install only the pieces you need.

Key takeaways

  • Flux CD is a CNCF Graduated GitOps toolkit for Kubernetes, built from small controllers that each own one family of custom resources.
  • Sources fetch desired state from Git, OCI registries, Helm repositories or buckets; appliers reconcile that state into the cluster.
  • The kustomize-controller applies Kustomize builds with server-side apply, pruning and health checks.
  • The helm-controller performs real Helm releases using the Helm SDK, with drift detection and remediation.
  • Image automation controllers scan registries and commit new image tags back to Git automatically.
  • Flux has no built-in UI; you operate it through kubectl, the flux CLI and the status conditions on its resources.

What is Flux CD?

Flux CD is an open-source continuous delivery and GitOps tool for Kubernetes. It runs as an agent inside the cluster and continuously monitors both a source repository and the cluster itself, applying updates whenever the two disagree. The desired state lives in Git; the cluster is the actual state; Flux closes the gap between them, over and over, on a schedule you configure.

The defining idea is composability. Flux is not one controller but a toolkit of controllers, each doing one job and communicating through Kubernetes custom resources. The source-controller fetches content. The kustomize-controller and helm-controller apply it. The notification-controller sends events elsewhere and receives webhooks. The image controllers close the loop on container tags. You compose these pieces like building blocks, and you can run just the source and kustomize controllers if that is all you need.

This design has a practical consequence for how Flux feels to operate. There is no central server to log into, no separate user database, and no dashboard. Everything about Flux is visible through the Kubernetes API: each resource carries status conditions, each controller emits events, and kubectl describe is a genuine debugging tool for Flux itself. If your team already thinks in custom resources and reconciliation loops, Flux feels like home.

The controllers and what each one owns

The table below maps each controller to the resources it reconciles and the job it performs. You do not need to memorise it, but you should know which controller to blame when something goes wrong.

Controller Custom resources Job Installed by default?
source-controller GitRepository, OCIRepository, HelmRepository, HelmChart, Bucket Fetches content on an interval and exposes it as a versioned artifact Yes
kustomize-controller Kustomization Builds a path from a source with Kustomize, applies it with server-side apply, prunes and health-checks Yes
helm-controller HelmRelease Installs, upgrades, tests and remediates Helm releases from fetched charts Yes
notification-controller Provider, Alert, Receiver Sends events to chat and other systems; receives webhooks that trigger reconciliation Yes
image-reflector-controller ImageRepository, ImagePolicy Scans registries and evaluates tag policies such as semver No, optional
image-automation-controller ImageUpdateAutomation Commits updated image tags back to Git when a policy matches No, optional

The separation between fetching and applying is the key design idea. The source-controller produces versioned artifacts — tarballs with a revision and a digest — and the appliers consume them. One GitRepository can feed many Kustomizations at different paths, and a failure in fetching does not look like a failure in applying, because the two are separate resources with separate status conditions.

Sources: where desired state comes from

Everything in Flux starts with a source. A GitRepository tells Flux which repository to fetch, which branch to track, and how often to check — every minute is a common interval. Flux clones the repository, verifies it, and publishes the content as an artifact other controllers can consume. If the repository is unreachable, the GitRepository resource reports that failure clearly, and nothing downstream pretends otherwise.

Git is the most common source, but not the only one. An OCIRepository fetches artifacts from an OCI registry, which suits teams that package configuration as OCI artifacts. A HelmRepository points at a chart repository, and a Bucket reads from S3-compatible object storage. The same pattern applies to each: fetch on an interval, verify, expose a versioned artifact.

One naming trap is worth flagging early. Flux has a Kustomization custom resource, which is a cluster object that says what to apply and how. That is distinct from the kustomization.yaml file that Kustomize itself reads inside a repository. The Flux object points at a path in a source and applies it; the file inside that path tells Kustomize how to build the manifests. Confusing the two is the most common early stumbling block, and it clears up as soon as you see both in one example.

Kustomization: apply, prune, wait, depend

A Kustomization points at a path inside a source and applies it. The kustomize-controller downloads the artifact, runs a Kustomize build on the path, and applies the result with server-side apply. It then prunes resources that were removed from Git, and health-checks the result, reporting whether the applied resources actually became healthy.

Three behaviours make Kustomizations powerful in practice. Pruning means deleting a manifest from Git genuinely deletes the resource from the cluster, which is what makes Git a real source of truth rather than a deployment log. Health checks mean a failed rollout is reported as a failure, not silently applied. And dependencies let you order Kustomizations: infrastructure first, then the applications that need it, with each waiting for the previous one to become healthy.

Each Kustomization has its own interval, so different parts of the system can reconcile at different speeds. A fast-moving application path might check every minute, while a slow-moving platform path checks every ten. Each object also carries its own status conditions and events, so when something is stuck, kubectl get kustomizations tells you which one and why.

HelmRelease: a real Helm release, reconciled

For third-party software, Helm charts are the usual unit of deployment. Flux fetches the chart through a HelmRepository or an OCIRepository, and the helm-controller manages the release using the Helm SDK. The result is a genuine Helm release, indistinguishable from one installed by hand with helm install, with history you can inspect and roll back.

That is a real difference from tools that render a chart and apply the output. Because Flux drives the Helm SDK, it detects drift on the release and can remediate it, run the chart’s tests, and roll back a failed upgrade according to the remediation policy you set. Chart values live in Git alongside the rest of your configuration, so the whole release is reproducible from the repository.

HelmRelease objects also support dependencies and health checks, like Kustomizations. A common pattern is a HelmRelease for an ingress controller or a database operator that other Kustomizations depend on, so the platform is fully ready before applications deploy. Combined with the source-controller, this gives you a complete, Git-driven way to install and maintain the software your cluster depends on.

Hands typing on a laptop showing a sync dashboard with circular arrows and green checkmarks
Flux continuously reconciles the cluster with Git, applying changes and reporting drift automatically.

Image automation: closing the loop

A GitOps purist objects to CI writing to the configuration repository. Flux offers another option: the cluster watches the registry and commits updates itself. Three objects cooperate. An ImageRepository scans a registry repository’s tags at an interval. An ImagePolicy picks the newest tag matching a rule, such as a semver range. An ImageUpdateAutomation commits the chosen tag back to Git, updating the manifests that reference the image.

The result is hands-free updates in lower environments. Push a new image, and within minutes the staging manifests carry the new tag, Flux applies them, and the whole change is visible as a commit. Production usually stays manual: the same mechanism can propose the update, but a human approves it, which keeps the promotion boundary explicit.

The image controllers are not installed by default. Add them at bootstrap time with the components-extra flag if you want them, or install them later when the need arises. That opt-in design is typical of Flux: the core stays small, and you add capabilities as your requirements grow.

Bootstrapping and day-to-day operation

flux bootstrap installs the controllers and configures Flux to manage itself from Git — a neat trick that means the tool that keeps the cluster in sync is itself kept in sync from the same repository. The bootstrap command takes a Git provider, a repository and a path, creates the Flux installation, and commits the manifests that describe it. From then on, upgrading Flux is a Git change like any other.

Day-to-day operation is mostly reading status. flux get all shows sources, Kustomizations and HelmReleases with their readiness. flux reconcile forces an immediate reconciliation when you do not want to wait for the interval. Webhooks, through the notification-controller’s Receiver, let your Git provider trigger reconciliation the moment a commit lands, so changes propagate in seconds rather than at the next poll.

Best for: platform teams that think in Kubernetes custom resources, want a small composable GitOps toolkit per cluster, and value real Helm releases and built-in image automation — Flux fits naturally alongside the GitOps workflow and the Kubernetes clusters it manages.

Getting started checklist

Use this checklist for a first Flux installation that stays manageable.

  • Start in a non-production cluster and bootstrap Flux against a dedicated configuration repository.
  • Keep platform configuration and application configuration in separate paths or repositories.
  • Set short reconcile intervals for application paths and longer ones for platform paths.
  • Enable pruning from the start, so deleting a manifest from Git genuinely removes the resource.
  • Use dependencies between Kustomizations to order platform before applications.
  • Wire the notification-controller to your chat tool so failures reach a human quickly.
  • Add image automation only for lower environments at first, and keep production promotion manual.
  • Record the bootstrap command and repository in your runbook, so the installation is reproducible.

Frequently asked questions

Is Flux hard to learn?

Flux has a wider surface than a single-application tool: you learn several custom resources instead of one. But each resource does one thing, and the concepts map directly onto Kubernetes itself, so operators who already know Kubernetes usually pick it up quickly.

Does Flux have a web UI?

No. Flux is operated through kubectl, the flux CLI and the status conditions on its resources. Ecosystem options exist, including dashboard projects and IDE extensions, and its Prometheus metrics feed Grafana dashboards.

What happens if Git is unreachable?

Flux keeps the last fetched artifact and continues reconciling from it, reporting the source as failed. The cluster keeps running on the last known good state, and reconciliation resumes automatically when Git becomes reachable again.

Can Flux manage resources outside Kubernetes?

No. Flux manages Kubernetes resources only. Infrastructure outside the cluster — networks, databases, DNS — needs a separate tool, such as Terraform or CloudFormation, and the two can share the same Git repository.

How is Flux different from Argo CD?

Flux is a toolkit of small controllers configured through Kubernetes custom resources, with no built-in UI. Argo CD is a single application with a dashboard, its own RBAC and SSO. Both reconcile Git to the cluster; they differ in shape, not in the job they do.

Who maintains Flux now?

Flux is a CNCF Graduated project maintained by its community. Weaveworks, the company that created it, closed in 2024, and the project has continued under community stewardship since then.

Latest articles

Scroll to Top