Use when forcing immediate reconciliation, suspending reconciliation for maintenance, rolling back failed deployments, upgrading Flux components, managing drift detection, or performing multi-cluster...
Manage Flux CD reconciliation operations including suspend, resume, force sync, rollback, and multi-cluster management.
flux, fluxcd, reconcile, suspension, resumption, sync, rollback, rolling back, drift, helmrelease, kustomization, gitops, operations, management, upgrade, upgrading, failure, failed, debugging, debug
| Task | Command |
|---|---|
| Force sync all | flux reconcile ks flux-system --with-source |
| Suspend resource | flux suspend ks <name> -n <ns> |
| Resume resource | flux resume ks <name> -n <ns> |
| Check status | flux get all -A |
| View diff | flux diff ks <name> --path <local> |
flux reconcile kustomization <name> -n <namespace> --with-source
flux reconcile helmrelease <name> -n <namespace> --with-source
flux reconcile source git <name> -n <namespace>
flux reconcile source oci <name> -n <namespace>
flux reconcile source helm <name> -n <namespace>
flux suspend kustomization <name> -n <namespace>
flux suspend helmrelease <name> -n <namespace>
flux suspend source git <name> -n <namespace>
GitOps method (persisted, recommended):
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: <name>
spec:
suspend: true
flux resume kustomization <name> -n <namespace>
flux resume helmrelease <name> -n <namespace>
git log --oneline -10
git revert <commit-sha>
git push origin main
flux reconcile kustomization flux-system --with-source
spec:
chart:
spec:
version: "1.2.3"
flux suspend helmrelease <name> -n <namespace>
helm history <release-name> -n <namespace>
helm rollback <release-name> <revision> -n <namespace>
flux resume helmrelease <name> -n <namespace>
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
spec:
driftDetection:
mode: enabled # or 'warn'
ignore:
- paths: ["/spec/replicas"]
target:
kind: Deployment
- paths: ["/metadata/annotations"]
target:
kind: Service
kubectl get helmrelease <name> -n <ns> -o jsonpath='{.status.drift}'
flux diff kustomization <name> --path ./path/to/local
flux version
flux check
brew upgrade fluxcd/tap/flux
flux install --export > flux-system/gotk-components.yaml
git add -A && git commit -m "Upgrade Flux to $(flux version --client)"
git push
flux bootstrap github \
--owner=<org> \
--repository=<repo> \
--branch=main \
--path=./clusters/production \
--personal
kubectl config get-contexts
kubectl config use-context <cluster-name>
flux check
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: shared-config
spec:
url: https://github.com/org/shared-config
ref:
branch: main
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
spec:
install:
remediation:
retries: 3
upgrade:
remediation:
retries: 5
remediateLastFailure: true
cleanupOnFail: true
rollback:
timeout: 5m
recreate: false
force: false
cleanupOnFail: false
test:
enable: true
spec:
install:
disableWait: true
upgrade:
disableWait: true
mcp__flux-operator-mcp__reconcile_flux_kustomizationmcp__flux-operator-mcp__reconcile_flux_helmreleasemcp__flux-operator-mcp__reconcile_flux_sourcemcp__flux-operator-mcp__suspend_flux_reconciliationmcp__flux-operator-mcp__resume_flux_reconciliation