k8wiz
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.