Flux
A lightweight, composable GitOps toolkit made of Kubernetes controllers for sources, Kustomize, Helm and image automation.
Intermediate · about 6 hours · difficulty 3/5
Learn first: GitOps Principles
Flux is a CNCF graduated GitOps project. Instead of one application with a UI, it is a set of small controllers you configure entirely with Kubernetes custom resources, which suits teams that like everything as code.
The toolkit
- Source controller:
GitRepository,OCIRepository,HelmRepositoryandBucketobjects fetch artifacts on an interval. - Kustomize controller:
Kustomizationobjects apply a path from a source, with pruning, health checks anddependsOnordering. - Helm controller:
HelmReleaseobjects install and upgrade charts declaratively, with automatic rollback on failure. - Notification controller: sends events to Slack or Teams and receives webhooks to trigger immediate syncs.
- Image automation controllers: scan registries and commit new tags back to Git by policy (for example latest semver in 1.x).
Getting started
flux bootstrap github installs Flux and commits its own manifests to your repository, so Flux manages itself from then on. A typical layout has clusters/<name> directories that point at shared infrastructure and apps folders.
Flux vs Argo CD
Both reconcile Git into clusters. Argo CD offers a strong UI and an application-centric model; Flux is lighter, CLI and CRD driven, and has native image automation and SOPS decryption. Many teams choose on UI needs and multi-tenancy style.
Good enough to move on: you can bootstrap Flux into a cluster, deploy a Helm chart through a HelmRelease, order infrastructure before apps with dependsOn, and set up an image policy that bumps a tag in Git.
Key concepts
- flux bootstrap
- GitRepository and OCIRepository sources
- Kustomization and dependsOn
- HelmRelease
- Image automation
- Notifications and webhooks
Other options for this step
- Argo CD: A Kubernetes-native GitOps controller with a rich UI that syncs Applications from Git and shows health and drift at a glance.
Mini project
Bootstrap Flux from a GitHub repository, install an ingress controller via HelmRelease in an infrastructure layer, deploy your app in an apps layer that depends on it, and enable image automation for the app.
Check yourself
Why does Flux commit its own installation manifests to your repository during bootstrap?
Free resources
- Flux documentation (Flux)
- Flux get started (Flux)