flux commands

29 commands, each with a one-line explanation. Click a command to copy it, or its title for details.

Commands 29 shown

  • flux check

    Verify all Flux controllers are running and CRDs are installed

  • flux get all -A

    Summary table: Kustomizations, HelmReleases, Sources — with sync status

  • flux reconcile kustomization <name> --with-source -n <ns>

    Trigger immediate git pull + apply

  • flux reconcile helmrelease <name> --with-source -n <ns>

    Re-run Helm install/upgrade cycle immediately

  • flux trace <kind>/<name> -n <ns>

    Show which Flux objects own and manage this resource

    debug

  • flux suspend kustomization <name> -n <ns>

    Pause sync — useful while doing manual hotfixes

  • flux resume kustomization <name> -n <ns>

    Re-enable a suspended Kustomization or HelmRelease

  • flux export kustomization --all > clusters/cluster.yaml

    Backup current Flux config as plain YAML for bootstrapping another cluster

    config

  • flux bootstrap github --owner=<org> --repository=<repo> --branch=main --path=clusters/production --personal

    Install Flux and push initial config to GitHub repo

    config

  • flux create source git <name> --url=https://github.com/org/repo --branch=main -n flux-system

    Register a git repo as a Flux source

  • flux create source helm <name> --url=https://charts.example.com -n flux-system

    Register a Helm chart repository as a Flux source

  • flux create helmrelease <name> --source=HelmRepository/<repo> --chart=<chart> --chart-version='>=1.0.0' -n <ns>

    Deploy a chart via Flux HelmRelease resource

    helm

  • kubectl get events -n flux-system --sort-by='.lastTimestamp' | tail -20

    Recent events from the flux-system namespace

    debug

  • flux delete kustomization <name> -n <ns>

    Remove a Kustomization or HelmRelease from the cluster

  • flux create image update <name> --git-repo-ref=<repo> --git-repo-path=./deploy --checkout-branch=main --push-branch=main -n flux-system

    Auto-update image tags in git when new images are pushed

    config

  • flux logs --kind=kustomize-controller -n flux-system --tail=50

    Follow logs from a specific Flux controller

    debug

  • flux create image policy <name> --image-ref=<image-repo> --select-semver='>=1.0.0' -n flux-system

    Define which image tags Flux should track for automation

  • flux create source oci <name> --url=oci://reg/repo --tag-semver='>=1.0.0' --interval=5m

    Track an OCI artifact by semver range instead of git; modern: GitOps from a registry

    gitops · k8s · cloud

  • 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)

    Package manifests into an OCI artifact tagged by commit; note: embeds source+revision metadata

    gitops · ci · cloud

  • flux diff kustomization <name> --path ./overlays/prod

    Server-side dry-run showing exactly what Flux would change before applying

    gitops · debug · k8s

  • flux tree kustomization <name>

    List every object a kustomization owns, including nested kustomizations

    gitops · k8s · troubleshooting

  • flux build kustomization <name> --path ./ | kubectl apply --dry-run=server -f -

    Render the final manifests offline with Flux substitutions, then validate server-side

    gitops · ci · debug

  • flux get images all -A

    Show all ImageRepositories, policies and update automations across namespaces

    gitops · monitoring · k8s

  • flux get image policy -A && flux get image repository -A

    See which tag each policy selected and last scan results per repository

    gitops · monitoring · troubleshooting

  • flux create provider slack --type slack --secret-ref webhook && flux create alert prod --provider-ref slack --event-source 'Kustomization/*' --event-severity info

    Wire reconcile events to Slack via a provider+alert; note: webhook lives in a secret

    notifications · observability · gitops

  • flux create receiver github --type github --event github:push --secret-ref webhook-token --resource GitRepository/<name>

    Generate a webhook URL so git pushes trigger instant reconcile instead of polling

    notifications · ci · gitops

  • flux reconcile source git <name>

    Pull the latest commit now without touching dependent kustomizations

    gitops · troubleshooting · k8s

  • flux events --for Kustomization/<name>

    Stream the reconcile event history for one object to diagnose drift or failures

    observability · debug · troubleshooting

  • flux create kustomization app --source=GitRepository/<name> --path=./app --depends-on=infra --prune=true --interval=10m

    Block app reconcile until infra kustomization is ready; note: enforces apply ordering

    gitops · k8s · troubleshooting