<p>When I ran the command below, I got the below messages</p>
<pre><code>bistel@BISTelResearchDev-DN03:~$ kubectl get nodes
The connection to the server localhost:8080 was refused - did you specify the right host or port?
</code></pre>
<p>While in the master node, I get the information as below:</p>
<pre><code>bistel@BISTelResearchDev-NN:/etc/kubernetes$ kubectl get nodes
NAME                     STATUS     ROLES    AGE   VERSION
bistelresearchdev-dn03   NotReady   &lt;none&gt;   62s   v1.19.3
bistelresearchdev-nn     Ready      master   57m   v1.19.3
bistel@BISTelResearchDev-NN:/etc/kubernetes$ 
</code></pre>
<p>The <code>bistelresearchdev-dn03</code> is the worker node and the message appears when I ran any command using <code>kubectl</code> as follows <code>The connection to the server localhost:8080 was refused - did you specify the right host or port?</code>.</p>
<p>I googled it a lot but any trials didn't work for me.</p>
<p>Thanks,</p>

sclee1
<p><code>kubectl</code> works only on master node in cluster. If you are getting this error then there is no issue.
I can see the issue here is node is <code>NotReady</code> status for that you can check below things.</p>
<ol>
<li><p>Check kubelet is running on node <code>bistelresearchdev-dn03</code> with <code>systemctl status kubelet</code></p>
</li>
<li><p>Check network plugin is installed on your cluster.</p>
</li>
</ol>
