Flux — GitOps Toolkit for Kubernetes Continuous Delivery
Flux is a CNCF-graduated GitOps toolkit for Kubernetes. Keep clusters in sync with Git repositories automatically. Composable controllers, Helm/Kustomize support, and image automation.
What it is
Flux is a CNCF-graduated GitOps toolkit for Kubernetes continuous delivery. It watches Git repositories, Helm repositories, and OCI registries, then reconciles your cluster state to match. When you push a change to Git, Flux applies it to your cluster automatically.
Flux is built as a set of composable controllers: source-controller fetches artifacts, kustomize-controller applies manifests, helm-controller manages Helm releases, and image-automation-controller updates image tags in Git.
How it saves time or tokens
Flux eliminates manual kubectl apply workflows. Every deployment is a Git commit, which means you get audit trails, rollback via git revert, and PR-based approvals for infrastructure changes. No more SSH-ing into bastion hosts to deploy.
The multi-tenancy model lets platform teams define boundaries while application teams self-serve their own namespaces and Helm releases.
How to use
- Install the Flux CLI:
curl -s https://fluxcd.io/install.sh | sudo bash - Bootstrap Flux on your cluster:
flux bootstrap github --owner=my-org --repository=fleet --path=clusters/production - Add a GitRepository source pointing to your app manifests
- Create a Kustomization resource that reconciles the source to your cluster
Example
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: my-app
namespace: flux-system
spec:
interval: 1m
url: https://github.com/my-org/my-app
ref:
branch: main
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: my-app
namespace: flux-system
spec:
interval: 5m
path: ./deploy
prune: true
sourceRef:
kind: GitRepository
name: my-app
Related on TokRepo
- DevOps tools -- More CI/CD and infrastructure tools
- Automation tools -- Workflow automation for deployments
Common pitfalls
- Setting
prune: truewithout understanding it will delete resources removed from Git; test in staging first - Flux reconciliation intervals default to 10 minutes; set shorter intervals for faster feedback loops
- Secrets in Git require SOPS or Sealed Secrets integration; Flux does not handle plain-text secrets safely
Frequently Asked Questions
Both are CNCF GitOps tools. Flux is controller-based and composable, designed to be extended. ArgoCD provides a rich UI and application-centric model. Flux is often preferred for platform teams managing many clusters; ArgoCD for teams wanting a visual dashboard.
Yes. The helm-controller manages HelmRelease resources that reference Helm charts from HelmRepository or GitRepository sources. You define values in the HelmRelease spec, and Flux handles install, upgrade, and rollback automatically.
Yes. A common pattern is a management cluster running Flux that reconciles manifests for multiple target clusters. Each cluster has its own path in the Git repository, and Flux applies the correct manifests to each cluster.
Flux integrates with Mozilla SOPS and Bitnami Sealed Secrets. You encrypt secrets in Git, and Flux decrypts them during reconciliation using keys stored in the cluster. Plain-text secrets should never be committed to Git.
Flux reports the failure in the Kustomization or HelmRelease status. It retries on the next interval. You can view errors with 'flux get kustomizations' or check Kubernetes events. Failed reconciliations do not roll back previous successful states.
Citations (3)
- Flux GitHub— Flux is a CNCF-graduated GitOps toolkit for Kubernetes
- Flux Docs— Flux composable controllers architecture
- CNCF— CNCF graduated project status
Related on TokRepo
Discussion
Related Assets
Conda — Cross-Platform Package and Environment Manager
Install, update, and manage packages and isolated environments for Python, R, C/C++, and hundreds of other languages from a single tool.
Sphinx — Python Documentation Generator
Generate professional documentation from reStructuredText and Markdown with cross-references, API autodoc, and multiple output formats.
Neutralinojs — Lightweight Cross-Platform Desktop Apps
Build desktop applications with HTML, CSS, and JavaScript using a tiny native runtime instead of bundling Chromium.