I'm setting up a 2 node cluster in kubernetes. 1 master node and 1 slave node. After setting up master node I did installation steps of docker, kubeadm,kubelet, kubectl on worker node and then ran the join command. On master node, I see 2 nodes in Ready state (master and worker) but when I try to run any kubectl command on worker node, I'm getting connection refused error as below. I do not see any admin.conf and nothing set in .kube/config . Are these files also needed to be on worker node? and if so how do I get it? How to resolve below error? Appreciate your help
root@kubework:/etc/kubernetes# kubectl get nodes The connection to the server localhost:8080 was refused - did you specify the right host or port?
root@kubework:/etc/kubernetes# kubectl cluster-info
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'. The connection to the server localhost:8080 was refused - did you specify the right host or port? root@kubework:/etc/kubernetes#