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.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →