megha
megha

Reputation: 833

Error running kustomization : no matches for kind "Kustomization" in version "http://kustomize.config.k8s.io/v1beta1"

I am trying to run kubectl apply for kustomization.yaml and getting below error

E0316 17:33:20.781816 12333 memcache.go:255] couldn't get resource list for http://external.metrics.k8s.io/v1beta1: Got empty response for: http://external.metrics.k8s.io/v1beta1 E0316 17:33:21.138951 12333 memcache.go:255] couldn't get resource list for http://external.metrics.k8s.io/v1beta1: Got empty response for: http://external.metrics.k8s.io/v1beta1 error: resource mapping not found for name: "" namespace: "" from "./kustomization.yaml": no matches for kind "Kustomization" in version "http://kustomize.config.k8s.io/v1beta1" ensure CRDs are installed first

I can successfully execute

Kubectl kustomize .

However, having issue running kubectl apply -f kustomization.yaml

Upvotes: 3

Views: 1125

Answers (1)

hobbs
hobbs

Reputation: 240521

kubectl apply -f kustomization.yaml is wrong, because kustomization.yaml isn't a kubernetes manifest to apply. You want kubectl apply -k .

Upvotes: 4

Related Questions