I suspect kubectl kustomize
doesn't support sub commands. You should instead create your kustomization.yaml
file and simply run kubectl kustomize
to generate your manifests. If I recall correctly, until a couple of years ago, the kustomize
project was available as a go module
which allowed the kubectl
developers to include it in their projects and make use of its capabilities. Later, it was moved to the state of being a stand-alone project and no longer offered as a module for developers, and there was no motive to duplicate the efforts by reimplementing the kustomize
functionality in programs. Perhaps that's why it was never fully integrated into kubectl
and many other projects that try to use it.
Notice that the error says specify one path to kustomization.yaml
. This means the command is interpreting your sub command as a path.
You san simply provide this as:
kubectl kustomize <dir of kustomization.yaml>
You can read more about the command and supported flags here.
Note that if you are running kustomize
on a directory structure, you will require a kustomization.yaml
file in every subdir.