flux
29 commands
29 shown
Check Flux health
Verify all Flux controllers are running and CRDs are installed
flux check
Get all Flux resources
Summary table: Kustomizations, HelmReleases, Sources — with sync status
flux get all -A
Force reconcile Kustomization
Trigger immediate git pull + apply
flux reconcile kustomization <name> --with-source -n <ns>
Force reconcile HelmRelease
Re-run Helm install/upgrade cycle immediately
flux reconcile helmrelease <name> --with-source -n <ns>
Trace a resource
Show which Flux objects own and manage this resource
flux trace <kind>/<name> -n <ns>
Suspend reconciliation
Pause sync — useful while doing manual hotfixes
flux suspend kustomization <name> -n <ns>
Resume reconciliation
Re-enable a suspended Kustomization or HelmRelease
flux resume kustomization <name> -n <ns>
Export all Flux resources
Backup current Flux config as plain YAML for bootstrapping another cluster
flux export kustomization --all > clusters/cluster.yaml
Bootstrap with GitHub
Install Flux and push initial config to GitHub repo
flux bootstrap github --owner=<org> --repository=<repo> --branch=main --path=clusters/production --personal
Create GitRepository source
Register a git repo as a Flux source
flux create source git <name> --url=https://github.com/org/repo --branch=main -n flux-system
Create HelmRepository source
Register a Helm chart repository as a Flux source
flux create source helm <name> --url=https://charts.example.com -n flux-system
Create HelmRelease
Deploy a chart via Flux HelmRelease resource
flux create helmrelease <name> --source=HelmRepository/<repo> --chart=<chart> --chart-version='>=1.0.0' -n <ns>
Get Flux events
Recent events from the flux-system namespace
kubectl get events -n flux-system --sort-by='.lastTimestamp' | tail -20
Delete Flux resource
Remove a Kustomization or HelmRelease from the cluster
flux delete kustomization <name> -n <ns>
Flux image update automation
Auto-update image tags in git when new images are pushed
flux create image update <name> --git-repo-ref=<repo> --git-repo-path=./deploy --checkout-branch=main --push-branch=main -n flux-system
Logs of Flux controller
Follow logs from a specific Flux controller
flux logs --kind=kustomize-controller -n flux-system --tail=50
Push image policy
Define which image tags Flux should track for automation
flux create image policy <name> --image-ref=<image-repo> --select-semver='>=1.0.0' -n flux-system
OCI source by semver
Track an OCI artifact by semver range instead of git; modern: GitOps from a registry
flux create source oci <name> --url=oci://reg/repo --tag-semver='>=1.0.0' --interval=5m
Push manifests as OCI artifact
Package manifests into an OCI artifact tagged by commit; note: embeds source+revision metadata
flux push artifact oci://reg/manifests:$(git rev-parse --short HEAD) --path=./manifests --source=$(git config --get remote.origin.url) --revision=$(git rev-parse HEAD)
Diff kustomization vs cluster
Server-side dry-run showing exactly what Flux would change before applying
flux diff kustomization <name> --path ./overlays/prod
Tree of managed objects
List every object a kustomization owns, including nested kustomizations
flux tree kustomization <name>
Build kustomization locally
Render the final manifests offline with Flux substitutions, then validate server-side
flux build kustomization <name> --path ./ | kubectl apply --dry-run=server -f -
List image automation state
Show all ImageRepositories, policies and update automations across namespaces
flux get images all -A
Inspect selected image tag
See which tag each policy selected and last scan results per repository
flux get image policy -A && flux get image repository -A
Slack alert pipeline
Wire reconcile events to Slack via a provider+alert; note: webhook lives in a secret
flux create provider slack --type slack --secret-ref webhook && flux create alert prod --provider-ref slack --event-source 'Kustomization/*' --event-severity info
Webhook receiver for push
Generate a webhook URL so git pushes trigger instant reconcile instead of polling
flux create receiver github --type github --event github:push --secret-ref webhook-token --resource GitRepository/<name>
Force refetch git source
Pull the latest commit now without touching dependent kustomizations
flux reconcile source git <name>
Timeline of resource events
Stream the reconcile event history for one object to diagnose drift or failures
flux events --for Kustomization/<name>
Ordered kustomization with depends-on
Block app reconcile until infra kustomization is ready; note: enforces apply ordering
flux create kustomization app --source=GitRepository/<name> --path=./app --depends-on=infra --prune=true --interval=10m
no commands match