Unable to connect to the server: dial tcp <ip>:443: i/o timeout
kubectl can’t reach the API server at all — network path, VPN, firewall or a private endpoint you’re outside of.
Unable to connect to the server: dial tcpUnable to connect to the server: net/http: TLS handshake timeoutcontext deadline exceeded Meaning
i/o timeout means packets go unanswered: private EKS/AKS/GKE endpoints reachable only from the VPC, authorized-IP lists that don’t include you, a disconnected VPN, or a stopped local cluster.
Common causes
- Private API endpoint and you’re outside the network/VPN
- Your IP not in the authorized networks list
- Cluster stopped/deleted (minikube, kind, cloud)
- Stale kubeconfig pointing to an old IP
⚡ Quick fix
- Connect the VPN/bastion or enable the public endpoint for your IP
- Check the cluster is running
- Regenerate kubeconfig
Detailed fix by platform
Shell
- bash
kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}' nc -vz <api-host> 443
How to diagnose
- Endpoint — Server URL in kubeconfig
- Reach — nc/curl to it
- Cluster — Running?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Kubernetes
- provided port is not in the valid range spec.ports[0].nodePort: Invalid value: 80: provided port is not in the valid range. The range of valid ports is 30000-32767
- the object has been modified Operation cannot be fulfilled on deployments.apps "x": the object has been modified; please apply your changes to the latest version and try again
- error converting YAML to JSON error converting YAML to JSON: yaml: line 12: did not find expected key
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 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.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 13 Oct 2026