~/kustomize build ./kustomize/qa
Error: no matches for OriginalId ~G_~V_Deployment|~X|my-app; no matches for CurrentId ~G_~V_Deployment|~X|my-app; failed to find unique target for patch ~G_~V_Deployment|my-app
I have a look related files and don’t see any typo on the application name.
How to resolve this problem?
Cluster information:
Kubernetes version: 1.17.3
Cloud being used: (put bare-metal if not on a public cloud)
Installation method:
Host OS: Linuxmint 18.2
CNI and version:
CRI and version:
You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.
Just ran into this same issue. Your answer just saved me many more hours of googling. Thank you!
I’ve also created a stackoverflow question to ask about this. You might want to follow it if you’re interested.
stackoverflow.com
I ran into same issue and had to use the fix mentioned in this bug - Undocumented change in patchesJson6902 handling from v2.1.0 and v3.0.x · Issue #1351 · kubernetes-sigs/kustomize · GitHub
Had to remove the namespace from the base yaml.
I had an error that looked almost like this:
error: accumulating resources: accumulation err=‘accumulating resources from ‘kube/anne’: ‘/home/anne/IdeaProjects/PlanYourProject/kube/anne’ must resolve to a file’: recursed accumulation of path ‘/home/anne/IdeaProjects/PlanYourProject/kube/anne’: no matches for Id apps_v1_Service|~X|pyp; failed to find unique target for patch apps_v1_Service|pyp
My solution was to change the apiVersion in the patch for my pyp service from apps/v1, to just v1.
Because the service was defined with apiVersion v1. Hope this helps someone 
you have to create update-replicas.yaml in your base folder.
put the filename also in base/kustomization.yaml under "resources: "
Here you can find a good tutorial:
Kustomize Tutorial With Instructions & Examples | Densify