the server doesn't have a resource type: kubectl does not recognise the resource name you used
This means the short name or plural you typed does not map to any resource the cluster serves — a typo, a resource that needs a CRD, or a stale discovery cache.
Applies to: All Kubernetes versions
What it means
kubectl resolves a resource name against the cluster's discovery data, which includes each resource's plural, singular, and short names. When nothing matches, it reports that the server has no such resource type. Most often this is a spelling or pluralisation mistake, or a custom resource whose definition is not installed. The case worth knowing about is the stale cache: kubectl caches discovery on disk, so a resource added to the cluster very recently may be absent from the cache and produce this error despite existing.
Most common causes
- A typo, or a plural form the cluster does not use.
- A custom resource whose CRD is not installed.
- A CRD installed moments ago, with kubectl's discovery cache not yet refreshed.
- A resource that was removed in the cluster's Kubernetes version.
- An aggregated API server that is unavailable, so its resources are missing from discovery.
- A short name that exists in a different distribution but not in vanilla Kubernetes.
How to diagnose it
- List what the cluster actually serves, with short names:
kubectl api-resources. - Search for the resource:
kubectl api-resources | grep -i PARTIAL_NAME. - Check whether the CRD exists:
kubectl get crd | grep NAME. - Clear the discovery cache to rule it out — the cache directory under the kubectl home can be removed safely.
- Check for unavailable aggregated APIs:
kubectl get apiservices | grep -v True.
How to fix it
- Use the name shown by
kubectl api-resources. - Install the CRD or the operator providing the resource.
- Clear the discovery cache after installing new CRDs, or simply retry — it refreshes on its own interval.
- Restore an unavailable aggregated API server.
- Use a supported resource name for the cluster's version if the one you used was removed.
Notes
kubectl api-resources is the definitive answer for what a cluster serves, including every custom resource and its short names. It is faster than searching documentation, which may describe a different version or distribution.
Related
- no matches for kind — The cluster does not recognise this resource type
- couldn't get current server API group list — Discovery against the API server failed
Sources
- Kubernetes documentation — kubectl Quick Reference
- Kubernetes documentation — Custom Resources
- Kubernetes documentation — Kubernetes API Concepts