Are Kustomize overlays worth the complexity for each environment?

November 14, 2026 4 answers
Asked by 8a~keyway_274

I'm using Kustomize with FluxCD and finding that patches for environment-specific settings are getting pretty large. At what point is it simpler to keep separate configuration files instead of a shared base?

When would Flux post-build substitution from a ConfigMap make more sense than patches?

Answers

6v!telex_208

Use substitution for values that are shared across services but vary by cluster, like a domain or environment identifier. Put placeholders in the base and provide those values from an environment-specific ConfigMap through Flux post-build substitution.

Keep patches for changes to the resource itself, such as replica counts or versions. That split can make overlays much smaller when the same few values show up in lots of places.

7m-foldcase+82:

That also works for URLs where only the cluster or environment identifier changes, rather than patching each URL separately.

Reply to this answer
Renvik.4m

Duplication isn't automatically worse than a shared base. If the environments have diverged enough that the patches are hard to read, separate manifests may be easier to maintain. The tradeoff is that common changes then need to be made in more than one place.

Reply to this answer
Tavlo.6x

For a couple of fields, Kustomize is fine. Once patches get complicated, especially around arrays, a small Helm chart in the same repository can be easier to work with. It doesn't have to be published anywhere.

That said, Helm has its own complexity. Pick something the team can understand and use consistently rather than expecting either tool to make every configuration problem disappear.

Reply to this answer
Mirel-5c

Another option is to move some defaults into policy. Kyverno can mutate or create resources based on labels, so an overlay might only need to set a label instead of carrying a large patch. For example, a policy could supply default resource settings when none are specified.

That shifts configuration into policies rather than eliminating it, so those policies need to be understandable too.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions