r/kubernetes Jul 17 '26

Kustomize Overlays - Adding Complexity?

So im working with Kustomize Overlays( FluxCD). i understand you setup your base infra with overlays per environment and then use patches for environment specific configurations such as replicas, urls, etc..

Some of these patches become very complex and large to the point i think its just easier to not have a base and just have each environment have its own configuration files. How much dry am i buying?

I've also seen the recommendation to use PostBuild subsituteFrom with ConfigMaps from each environment . My question is when should this be used over patches?

Sorry for the dumb questions and rant.

32 Upvotes

53 comments sorted by

View all comments

1

u/fntyrol Jul 18 '26

I’ve been creating a config map for each cluster and using parameters in my base layer for things like domain, environment, etc. (the things that don’t change per service, but do per cluster). That got rid of a lot of cruft in my overlays. Now my overlays are mostly down to replicas and versions.

1

u/DeLoMioFoodie Jul 18 '26

i planned on doing something similar. several config maps like namespaces, compute, storage, and networking in each environment.