Missing or incomplete configuration info. Please point to an existing, complete config file
Routes kubectl users with no usable kubeconfig. Use when kubectl prints Missing or incomplete configuration info. Not for connection refused, auth plugin, or RBAC errors where a config file does exist.
kubectl found no usable kubeconfig: KUBECONFIG is unset or points at a missing file, and there is no ~/.kube/config. Generate one with your provider's command (aws eks update-kubeconfig, gcloud get-credentials, az aks get-credentials) or export KUBECONFIG to the right path. Then kubectl config current-context prints your context.
The error
error: Missing or incomplete configuration info. Please point to an existing, complete config file:What to do
- See what kubectl is looking at:
echo $KUBECONFIG
ls -la ~/.kube/configExpected: Shows whether the env var is set and whether the default file exists.
- Fetch a fresh config from your provider, e.g. for EKS:
aws eks update-kubeconfig --name [cluster] --region [region]Expected: Prints 'Added new context ...'.
- Or point at an existing file:
export KUBECONFIG=/path/to/configExpected: No output; the variable is set.
- Verify:
kubectl config current-contextExpected: Prints a context name, no error.
When this applies
- fresh machines or CI runners with no kubeconfig yet
- KUBECONFIG pointing at a deleted or moved file
- the exact Missing or incomplete configuration info message
When it does NOT apply
- a config file exists but the cluster is unreachable (different error)
- expired credentials or forbidden errors
Works with
all kubectl versions; AWS/GKE/AKS CLIs for the provider step
error: no configuration has been provided
Older client-go wording for the same missing-config situation. Same fix.
Why it happens
kubectl resolves config from --kubeconfig, then $KUBECONFIG, then ~/.kube/config. When all three come up empty it can not build a client, so it errors before any network call.
Edge cases
- In CI, export KUBECONFIG in the same step that runs kubectl - env vars do not survive across separate job steps unless persisted.
- A KUBECONFIG listing several files merges them; a typo in one path silently drops that file.
Resolved from
gh:kubernetes/kubectl#523 - https://github.com/kubernetes/kubectl/issues/523