← All insightsCheat Sheet

Flux CD cheat sheet: the complete command reference

CodeWizard Engineering · 3 June 2026 · 3 min read · Beginner

This is a complete, hands-on Flux CD cheat sheet: install, configure, operate, automate and secure it - with copy-paste commands grouped by task. Bookmark it for day-to-day work, incidents and interviews alike.

Flux is a set of Kubernetes controllers that keep clusters in sync with sources like Git, Helm repositories and OCI artifacts, with first-class Kustomize and Helm support.

Why you reach for it

  • Composable controllers (source, kustomize, helm, notification)
  • Native Helm and Kustomize reconciliation from Git or OCI
  • Strong multi-tenant and progressive-delivery support (Flagger)

Installation

bash
curl -s https://fluxcd.io/install.sh | sudo bash
flux check --pre
flux bootstrap github --owner=acme --repository=fleet --path=clusters/prod

Configuration reference

A GitRepository source plus a Kustomization that applies it.

yaml
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata: { name: apps, namespace: flux-system }
spec:
  interval: 1m
  url: https://github.com/acme/deploy
  ref: { branch: main }
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata: { name: web, namespace: flux-system }
spec:
  interval: 5m
  path: ./apps/web
  prune: true
  sourceRef: { kind: GitRepository, name: apps }

Core commands you use daily

bash
flux get kustomizations
flux reconcile kustomization web --with-source
flux suspend kustomization web

Inspect & reconcile

bash
flux get sources git -A
flux get kustomizations -A
flux get helmreleases -A
flux reconcile kustomization web --with-source
flux suspend kustomization web && flux resume kustomization web

Bootstrap

bash
flux check --pre
flux bootstrap github --owner=acme --repository=fleet --path=clusters/prod --personal

Use it in CI/CD

Flux watches Git, so CI just updates manifests and pushes.

bash
flux create image update web --git-repo-ref=apps --path=./apps/web --checkout-branch=main

Best-practice checklist

  • Set prune:true and sensible intervals per Kustomization
  • Use the notification controller to alert on reconcile failures
  • Separate infrastructure and app Kustomizations with dependsOn

Common pitfalls to avoid

  • Long reconcile intervals hiding how stale the cluster is
  • Forgetting prune:true, so deleted files stay live in the cluster
  • No notifications wired up, so failed reconciliations go unnoticed

Security quick wins

  • Encrypt secrets with SOPS and let Flux decrypt in-cluster
  • Lock down source repos and use least-privilege deploy keys

Works well with

  • Argo CD - GitOps continuous delivery for Kubernetes - Git is the source of truth, the cluster is reconciled to match.
  • Kubernetes - Declarative orchestration for containers at scale - self-healing, rolling updates and service discovery.
  • kustomize
A cheat sheet is muscle memory on paper - keep it close until the commands live in your fingers.

Want senior help putting Flux CD to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult