Skip to content
Back to the playbook

Fixing kubectl 'the server doesn't have a resource type'

kubectlKubernetesrevision 1

Diagnostic tree

  1. In progresskubectl: the server doesn't have a resource type "<name>"Kubernetes' supported kubectl-to-API-server version skew is +/-1 minor version and does not, on its own, make a resource type disappear — for a built-in resource this error essentially never means version skew. It means the API server kubectl is actually talking to right now doesn't have that resource type registered at all.
View the whole map (7 more steps)
  • Confirm which cluster/context kubectl is actually talking to
  • Fix: switch to the intended context
  • Check whether the resource is registered at all on this cluster
  • Root cause: RBAC or a broken aggregated API is hiding it from discovery
  • Check whether the CustomResourceDefinition is actually installed
  • Fix: apply the missing CustomResourceDefinition
  • Root cause: the CRD exists but isn't Established, or its scope doesn't match

What to test

kubectl: the server doesn't have a resource type "<name>"

Kubernetes' supported kubectl-to-API-server version skew is +/-1 minor version and does not, on its own, make a resource type disappear — for a built-in resource this error essentially never means version skew. It means the API server kubectl is actually talking to right now doesn't have that resource type registered at all.

What happened?