KubeErrors

no matches for kind: The cluster does not recognise the resource type in your manifest

unable to recognize …: no matches for kind "X" in version "Y" means the API version and kind combination is not served by this cluster — the CRD is missing, or the version was removed.

Applies to: All Kubernetes versions

What it means

Before sending an object, kubectl resolves its apiVersion and kind against the cluster's discovery information. If no served resource matches, the request never leaves the client. Two distinct situations produce this. Either the type is a custom resource whose CustomResourceDefinition is not installed — very common when a manifest bundle applies a CRD and an instance of it in the same pass, and the instance is processed before the definition is established. Or the type is built in but the manifest names an API version the cluster no longer serves, which happens on upgrades that complete a long-announced deprecation.

Most common causes

How to diagnose it

  1. List what the cluster serves: kubectl api-resources, and kubectl api-versions for versions.
  2. Check for the CRD: kubectl get crd | grep KIND.
  3. Check whether an existing CRD is established: kubectl get crd NAME -o jsonpath='{.status.conditions}'.
  4. For built-in kinds, check the deprecation guide for the cluster's version to find the replacement.
  5. If an aggregated API is involved, check its APIService is available: kubectl get apiservices | grep -v True.

How to fix it

  1. Install the CRD or the operator that provides the kind, and wait for it to be established before applying instances.
  2. Split manifest application into stages so CRDs are applied and established before their instances.
  3. Update the manifest to a served API version.
  4. Correct spelling and capitalisation in apiVersion and kind.
  5. Restore an unavailable aggregated API server.

Notes

Because this check happens client-side against discovery, a stale discovery cache can produce the error for a kind that does exist. Clearing the cache, usually under the kubectl cache directory, resolves that case and rules it out quickly.

Related

Sources

Pages on this site are written with AI assistance from the primary sources listed on each page, then checked against those sources before publishing.