# How do you substitute a per-cluster value such as ${cluster_region} into the manifests a Flux Kustomization applies?

Flux CD, Medium (Advanced), Concepts. https://k8wiz.com/uquiz/how-do-you-substitute-a-per-cluster-value-such-as-cluster_region-into-the-manifests-a-flux-kustomization-applies

- A. With a Helm values file referenced from the Kustomization
- B. With environment variables set on the kustomize-controller Deployment's pods
- C. With spec.postBuild.substitute, or substituteFrom a ConfigMap or Secret
- D. With a Kustomize patch that runs envsubst on the files

**Answer:** With spec.postBuild.substitute, or substituteFrom a ConfigMap or Secret

**Explanation:** After building the manifests, kustomize-controller replaces ${var} with values from postBuild.substitute or from the ConfigMaps and Secrets in substituteFrom. ${var:=default} sets a fallback for a missing variable.
