k8s kustomize has always perplexed me (as a non-frequent user).
First of all, using it with
kubectl is different from using it standalone (even on the same kustomize version):
If we run
kubectl kustomize edit set annotation foo:bar , we may run into the error:
error: specify one path to kustomization.yaml
Meanwhile, if we run
kustomize edit set annotation foo:bar then it Just Works ™
Then, when it does error (like the above), there doesn’t seem to be a verbose mode that points out which line of our config was the cause of the error (at least I tried to search for the relevant doc, but in vain so far).
Don’t get me wrong. I’ve seen
kustomize used successfully in the projects I’ve worked with so far. And I have generally positive feelings towards this tool, and I don’t intend to change this viewpoint.
It’s just, as a non-frequent user, whenever I need to work with kustomize on a new system & if I happen to “forget” using the correct version of kustomize or about the standalone vs via
kubectl approach, then it’ll take me ~2 hours running around until facepalming myself.
C’est la vie.