Flux CD — A GitOps operator for Kubernetes that automatically synchronizes the cluster with Git.
Flux v2 consists of:
Bootstrap:
1flux bootstrap github \2 --owner=my-org \3 --repository=fleet-infra \4 --branch=main \5 --path=clusters/production \6 --personal
GitRepository:
1apiVersion: source.toolkit.fluxcd.io/v12kind: GitRepository3metadata:4 name: myapp5 namespace: flux-system6spec:7 interval: 1m8 url: https://github.com/org/k8s-manifests9 ref:10 branch: main
Kustomization:
1apiVersion: kustomize.toolkit.fluxcd.io/v12kind: Kustomization3metadata:4 name: myapp5spec:6 interval: 5m7 path: ./overlays/production8 sourceRef:9 kind: GitRepository10 name: myapp11 prune: true12 healthChecks:13 - apiVersion: apps/v114 kind: Deployment15 name: myapp16 namespace: production
Flux vs ArgoCD: Flux is lighter, built into K8s. ArgoCD has a UI, more features out of the box.