15

I am new to Kustomize and am getting the following error:

Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Kustomization" in version "kustomize.config.k8s.io/v1beta1"

but I am using the boilerplate kustomization.yaml

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml

Question: What does the group name (kustomize.config.k8s.io) mean and why does Kustomize not recognize the kind?

user3877654
  • 1,045
  • 1
  • 16
  • 40

4 Answers4

33

So this api version is correct, although I am still not certain why. In order to get past this error message, I needed to run:

kubectl apply -k dir/.

I hope this helps someone in the future!

user3877654
  • 1,045
  • 1
  • 16
  • 40
11

If you used apply -f you would see this error. Using -k would definitely work.

wxh
  • 619
  • 7
  • 20
2

You are using kustomize tool (Kustomize is a standalone tool to customize the creation of Kubernetes objects through a file called kustomization.yaml). For applying customization you have to use:

kubectl apply -k foldername(where you store the deploy,service yaml file)
S.B
  • 13,077
  • 10
  • 22
  • 49
Mithlaj
  • 151
  • 1
  • 5
0

My case is different. My kustomization is new version and "-k" option still is using old version of kustomize. I installed a new version of kustomize in environment. I run the following commands and it wokrs.

 kustomize build dir/. | kubectl apply -f -
Jack Liu Shurui
  • 540
  • 1
  • 5
  • 14