I just start using kustomize. I have the following yaml files for customize:
ls -l ./kustomize/base/ 816 Apr 18 21:25 deployment.yaml 110 Apr 18 21:31 kustomization.yaml 310 Apr 18 21:25 service.yaml
where deployment.yaml and service.yaml are generated files with jib and they are fine in running. And the content of the kustomization.yaml is the following:
apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - service.yaml - deployment.yaml
And in another directory
ls -l ./kustomize/qa 133 Apr 18 21:33 kustomization.yaml 95 Apr 18 21:37 update-replicas.yaml
apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ../base patchesStrategicMerge: - update-replicas.yaml
apiVersion: apps/v1 kind: Deployment metadata: name: my-app spec: replicas: 2
After running “kustomize build ./kustomize/base”, I run
~/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?
Kubernetes version: 1.17.3
Cloud being used: (put bare-metal if not on a public cloud)
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.