Kustomization: reconciling
Apply and prune from a source.
The Flux Kustomization (distinct from Kustomize the tool, though it uses it) is the reconciler: it takes a source and a path within it, builds the manifests (running Kustomize if a kustomization.yaml is present, or applying plain YAML), and applies them to the cluster on an interval, pruning resources that were removed. It is the workhorse that turns “this Git path” into “these resources, kept in sync.”
apiVersion: kustomize.toolkit.fluxcd.io/v1kind: Kustomizationmetadata: { name: payments, namespace: flux-system }spec:interval: 5msourceRef: { kind: GitRepository, name: payments }path: ./k8s/overlays/prodprune: true # delete resources removed from Gitwait: true # wait for applied resources to become readytargetNamespace: payments
Prune, wait, and health
Key fields: prune deletes resources that vanish from Git (like Argo CD prune), and wait makes Flux wait for the applied resources to become healthy before reporting success — so a Kustomization is not Ready until its workloads actually are. This health awareness is what lets you build dependency chains (next lesson). You reconcile on the interval automatically, or force it with flux reconcile for immediate feedback.
$ flux get kustomizationsNAME REVISION SUSPENDED READY MESSAGEpayments v1.4.0/abc12 False True Applied revision v1.4.0$ flux reconcile kustomization payments --with-source # force a sync now