Relative Content

Tag Archive for kuberneteskustomize

How to duplicate a specific object in a specific overlay from base with kustomize?

I have a base and two overlays: dev and prod, and all objects(Deployments, StatefulSets, Services etc.) defined in base layer are inherited in the two overlays. However, for some technical reason, I’d like to duplicate a specific Service “foo” in overlay prod to “foo-a”, “foo-b”, “foo-c”, but keep it unchanged in overlay dev. Like the following: