Skip to content
Latchkey

Crossplane "no matches for kind Composition" on kubectl apply in CI

kubectl could not map kind: Composition to a served resource. Either the apiextensions.crossplane.io CRDs are missing (core not installed) or the manifest declares an apiVersion the cluster does not serve.

What this error means

Applying a Composition or CompositeResourceDefinition fails with "no matches for kind \"Composition\" in version \"apiextensions.crossplane.io/v1\"".

kubectl
error: unable to recognize "composition.yaml": no matches for kind "Composition"
in version "apiextensions.crossplane.io/v1"

Common causes

The apiextensions CRDs are not installed

Core Crossplane registers Composition and CompositeResourceDefinition; without core installed the mapping does not exist.

A wrong or dropped apiVersion in the manifest

The manifest uses an apiVersion the running core no longer serves (for example a removed alpha), so kubectl cannot recognize it.

How to fix it

Install core, then confirm the CRD is served

  1. Install the Crossplane Helm chart and wait for readiness.
  2. List the apiextensions CRDs to confirm they are established.
  3. Re-apply the Composition.
Terminal
kubectl get crd | grep apiextensions.crossplane.io
kubectl apply -f composition.yaml

Use the apiVersion the cluster serves

Match the manifest apiVersion to what kubectl api-resources reports for Crossplane, and migrate off removed alpha versions.

Terminal
kubectl api-resources --api-group=apiextensions.crossplane.io

How to prevent it

  • Install core Crossplane before applying Compositions.
  • Keep manifest apiVersions aligned with the running core version.
  • Validate manifests against the cluster with crossplane beta validate in PRs.

Frequently asked questions

What causes ""no matches for kind Composition""?
Core Crossplane registers Composition and CompositeResourceDefinition; without core installed the mapping does not exist.
How do I fix "no matches for kind Composition"?
Install core, then confirm the CRD is served

Related guides

References

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