flux

29 commands

29 shown

Check Flux health Verify all Flux controllers are running and CRDs are installed flux check #flux Get all Flux resources Summary table: Kustomizations, HelmReleases, Sources — with sync status flux get all -A #flux Force reconcile Kustomization Trigger immediate git pull + apply flux reconcile kustomization <name> --with-source -n <ns> #flux Force reconcile HelmRelease Re-run Helm install/upgrade cycle immediately flux reconcile helmrelease <name> --with-source -n <ns> #flux Trace a resource Show which Flux objects own and manage this resource flux trace <kind>/<name> -n <ns> #flux#debug Suspend reconciliation Pause sync — useful while doing manual hotfixes flux suspend kustomization <name> -n <ns> #flux Resume reconciliation Re-enable a suspended Kustomization or HelmRelease flux resume kustomization <name> -n <ns> #flux Export all Flux resources Backup current Flux config as plain YAML for bootstrapping another cluster flux export kustomization --all > clusters/cluster.yaml #flux#config 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 #flux#config 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 #flux 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 #flux 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> #flux#helm Get Flux events Recent events from the flux-system namespace kubectl get events -n flux-system --sort-by='.lastTimestamp' | tail -20 #flux#debug Delete Flux resource Remove a Kustomization or HelmRelease from the cluster flux delete kustomization <name> -n <ns> #flux 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 #flux#config Logs of Flux controller Follow logs from a specific Flux controller flux logs --kind=kustomize-controller -n flux-system --tail=50 #flux#debug 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 #flux 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 #flux#gitops#k8s#cloud 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) #flux#gitops#ci#cloud Diff kustomization vs cluster Server-side dry-run showing exactly what Flux would change before applying flux diff kustomization <name> --path ./overlays/prod #flux#gitops#debug#k8s Tree of managed objects List every object a kustomization owns, including nested kustomizations flux tree kustomization <name> #flux#gitops#k8s#troubleshooting 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 - #flux#gitops#ci#debug List image automation state Show all ImageRepositories, policies and update automations across namespaces flux get images all -A #flux#gitops#monitoring#k8s 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 #flux#gitops#monitoring#troubleshooting 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 #flux#notifications#observability#gitops 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> #flux#notifications#ci#gitops Force refetch git source Pull the latest commit now without touching dependent kustomizations flux reconcile source git <name> #flux#gitops#troubleshooting#k8s Timeline of resource events Stream the reconcile event history for one object to diagnose drift or failures flux events --for Kustomization/<name> #flux#observability#debug#troubleshooting 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 #flux#gitops#k8s#troubleshooting
no commands match