couldn't get current server API group list: kubectl could not complete API discovery
Before most operations, kubectl asks the server which APIs exist. A failure here blocks nearly every command, and it usually means connectivity or authentication rather than anything about the resource you asked for.
Applies to: All Kubernetes versions
What it means
kubectl performs discovery to learn which resource types and versions the cluster serves, and caches the result. When discovery fails, the error names the API group list rather than the command you ran, which makes it look unrelated to what you were doing. The underlying causes are the familiar ones: the API server is unreachable, the credential is invalid, or an aggregated API server is registered and unavailable — that last case being particularly awkward, because one broken extension API can degrade discovery for the whole cluster.
Most common causes
- The API server is unreachable, so the error wraps a connection failure.
- The credential is expired or invalid, wrapping an authentication failure.
- An aggregated APIService is registered but its backing service is down.
- A stale discovery cache holding invalid data.
- A proxy interfering with the request.
- The user lacking permission to perform discovery, which is unusual but possible in tightly restricted clusters.
How to diagnose it
- Read the wrapped error after the phrase — it names the real cause.
- Test connectivity and authentication with a minimal call:
kubectl version. - Check for unavailable aggregated APIs:
kubectl get apiservices | grep -v True. - Clear the discovery cache to rule it out — the cache directory under the kubectl home can be removed safely.
- Check proxy environment variables.
How to fix it
- Restore connectivity or refresh the credential, depending on the wrapped error.
- Fix or remove an unavailable APIService. A registered-but-broken aggregated API affects far more than its own resources.
- Delete the discovery cache if it is stale.
- Correct proxy settings, including
NO_PROXYfor internal addresses.
Notes
A single unavailable aggregated API server is a disproportionately disruptive failure: kubectl's discovery slows down or fails, and commands unrelated to that API start reporting errors. Checking kubectl get apiservices is worth doing early whenever the whole CLI feels broken.
Related
- Unable to connect to the server — The API server address did not respond
- no matches for kind — The cluster does not recognise this resource type
Sources
- Kubernetes documentation — Kubernetes API Concepts
- Kubernetes documentation — Troubleshooting Clusters
- Kubernetes documentation — kubectl Quick Reference