doesn't have a resource type ☸️ Kubernetes

error: the server doesn't have a resource type "x"

kubectl doesn’t know the resource name you typed — a typo, a CRD that isn’t installed, or a stale discovery cache.

Seen on: Kubernetes

Meaning

Resource names come from API discovery. Custom resources appear only after their CRD is installed, and kubectl caches discovery in ~/.kube/cache, so freshly installed CRDs may need a cache refresh.

Common causes

  • Typo or wrong short name
  • CRD/operator not installed on this cluster
  • Stale discovery cache
  • Wrong cluster context

⚡ Quick fix

  1. List types: kubectl api-resources | grep -i name
  2. Install the CRD/operator
  3. Clear the cache: rm -rf ~/.kube/cache

Detailed fix by platform

Kubernetes

  1. bash
    kubectl api-resources | grep -i cert
    rm -rf ~/.kube/cache/discovery

How to diagnose

  1. Types — kubectl api-resources
  2. Context — Right cluster?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.