Skip to content
Latchkey

kubectl "no matches for kind in version" (apiVersion) in CI

kubectl maps each kind+apiVersion to a served API. When a manifest uses a version the cluster has dropped (a removed beta API) or a CRD that is not installed, there is no match to apply against.

What this error means

A kubectl apply step fails to recognize a manifest with "no matches for kind X in version Y", typically after a cluster upgrade removed a deprecated apiVersion.

kubectl
error: unable to recognize "ingress.yaml": no matches for kind "Ingress" in
version "extensions/v1beta1"

Common causes

Removed deprecated apiVersion

A cluster upgrade dropped a beta API (for example extensions/v1beta1 Ingress) the manifest still uses.

CRD not installed

A custom kind's CRD is absent, so its apiVersion is not served.

How to fix it

Migrate to the served apiVersion

  1. Update the manifest to the current stable apiVersion for the kind (for example networking.k8s.io/v1 Ingress).
  2. Confirm with kubectl api-resources / kubectl api-versions what the cluster serves.
  3. For CRDs, install the operator/CRD first.
Terminal
kubectl api-versions | grep networking

How to prevent it

  • Track apiVersion deprecations against your cluster version (use kubectl deprecations tooling).
  • Lint manifests against the target cluster version in CI.
  • Install CRDs before the resources that use them.

Frequently asked questions

What causes ""no matches for kind ... in version""?
A cluster upgrade dropped a beta API (for example extensions/v1beta1 Ingress) the manifest still uses.
How do I fix "no matches for kind ... in version"?
Migrate to the served apiVersion

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card