Combining multiple k8s kustomizations into one

10/4/2019

In Kubernetes I have a base kustomize package, and two patches to it, each patch adjusting a different aspect of the base - one for large deployment, and another to use a legacy image rather than the current one. Is there a way I can create a "combined" patch -- the one that has both changes, without copying large & legacy patch content?

- base/
- large-deployment-patch/
- legacy-image-patch/

When I tried to simply use both patches as bases in the combined patch, I get an error like this:

Error: ../legacy: id '"~G_v1_ConfigMap|~X|~P|pg-database|~S"' already used

-- Yurik
kubernetes
kustomize

0 Answers