kubectl commands trying to use private IPs

Posted April 23, 2019 3.4k views

Assorted kubectl commands (getting logs, trying to exec a shell on a container), fail with an i/o timeout because they are trying to connect over the private ip.


Error from server: Get dial tcp i/o timeout

Is there some config somewhere I need to change to get kubectl to stop trying to use the private IPs? I haven’t installed any networking plugins but it looks like Cilium comes installed by default, with DO managed k8s.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


You only need to download the cluster configuration file which you get during the creation of the cluster by clicking Actions and Download Config from the cluster home page. I’ve tried connecting to a pod and it seems to work fine.

Another thing that you might have to keep in mind is that you might have to open the port that you are trying to connect to for outgoing TCP traffic.