Kustomize
Medium
Troubleshooting
An overlay's strategic merge patch fails with "failed to find unique target for patch". What is the usual cause?
Select your answer:
Show answer and explanation
Answer: The patch's apiVersion, kind or name doesn't match any resource in the build
Explanation
A strategic merge patch finds its target by apiVersion, kind and name. A typo, a different API group, or a resource the base doesn't actually include leaves the patch with nothing to change. Run kustomize build on the base to see the names it produces.
More medium Kustomize questions
- A base and an overlay both have an images entry for nginx with different tags. Which tag ends up in the output?
- Which file names does Kustomize accept for the kustomization file in a directory?
- Why can adding a label through commonLabels make kubectl apply fail for an existing Deployment?
- How do you add a label to every resource without changing any selectors?
- What does an images entry with name: nginx and a digest: sha256:... value do?
- A strategic merge patch lists one container with a new image. What happens to the base's other containers?