Unable to manage kubernetes from another host via kubectl

5/12/2020

I can't set kubectl on another pc to control a kubernetes cluster.

From the cluster I get the file /etc/kubernetes/admin.conf, on my local pc I use docker and start the dtzar/helm-kubectl image, next i copy the admin.conf file.

When I use the command inside the docker container

kubectl --kubeconfig /home/admin.conf cluster-info

I get a timeout error

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

from the docker image, i can ping and connect via ssh to the server! I don't know what to check, to fix it. Any help is welcome

PS: The cluster ip is in intranet.

-- Mex
kubernetes

1 Answer

5/13/2020

My bad, the port 6443 was closed in the office firewall, once opened everything started working!

-- Mex
Source: StackOverflow