Skip to content
Latchkey

kubectl "the server doesn't have a resource type" in CI

You asked kubectl to operate on a resource type the API server does not know about. The CRD that defines it is not installed, or the resource name is misspelled.

What this error means

A kubectl get/describe/apply command fails with error: the server doesn't have a resource type "X". Unlike a permissions error, the type itself is unknown to the server.

kubectl output
error: the server doesn't have a resource type "certificates"

Common causes

The CRD is not installed

Resources like certificates, prometheuses, or rollouts only exist after their operator’s CRDs are applied. Without them the type is unknown.

Typo or wrong short name

A misspelled plural or an unknown short name (po vs pods) reads as a resource type the server cannot resolve.

How to fix it

List what the server actually serves

Confirm the resource exists and find its correct name and API group.

Terminal
kubectl api-resources | grep -i cert
kubectl get crds

Install the CRD or operator first

Terminal
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.15.0/cert-manager.crds.yaml
kubectl wait --for=condition=Established crd/certificates.cert-manager.io --timeout=60s

How to prevent it

  • Install CRDs as an explicit, ordered step before using custom resources.
  • Reference resources by their full kind.group when scripting in CI.
  • Verify kubectl api-resources includes the type before operating on it.

Related guides

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