Slow command on kubectl

4,522 views
Skip to first unread message

cristian...@gmail.com

unread,
Apr 21, 2018, 9:08:05 AM4/21/18
to Kubernetes user discussion and Q&A
Hi i'm triing to made a cluster on kubernetes but same times (like today) it give me to every kubernetes command:

Unable to connect to the server: dial tcp 192.168.0.101:6443: i/o timeout

Someone know how to fix this?

he...@andrewhowden.com

unread,
Apr 21, 2018, 10:27:30 AM4/21/18
to Kubernetes user discussion and Q&A
Hola Christian;

That means that the kubetl client is not able to make a connection to the kube apiserver. I think, when enabled, the non TLS port is exposed over local host for that service?

At any rate, it's worth:

- checking that the kube-apiserver is running, and is configured to listen on that port
- there are no firewalls in place between the client (kubectl) and the kube-apiserver

If you run

kubectl get pods -v=9

Kubectl will show you a cURL command you can use to further debug the issue.

Cristian Monti

unread,
Apr 22, 2018, 3:41:37 AM4/22/18
to Kubernetes user discussion and Q&A
Sorry, but what port are you talking about? because when i run the command i have never specify a port or ip to talk with

jo...@jfmedier.dk

unread,
Jun 6, 2018, 5:34:42 AM6/6/18
to Kubernetes user discussion and Q&A

Thanks! I had this problem for a long time, when running kubectl commands, it took 5-10 seconds before getting results back. With the kubectl get pods -v=9 i was able to debug the slow responses, and found out that my cache/discovery folder in .kube, had the wrong permissions.

This is the reponse time for kubectl get pods now:
real 0m0.105s
user 0m0.111s
sys 0m0.018s

Reply all
Reply to author
Forward
0 new messages