<p>I am new to kubernetes . I got the below error while interacting with the cluster <code>kubectl get nodes</code> .</p>

<p>ERROR:
<code>The connection to the server localhost:8080 was refused - did you specify the right host or port?</code></p>

sai saubhagya
<p>After search in the internet i fixed my issues .</p>

<pre><code>#sudo cp /etc/kubernetes/admin.conf $HOME/
</code></pre>

<p><code>#sudo chown $(id -u):$(id -g) $HOME/admin.conf</code></p>

<p><code>#export KUBECONFIG=$HOME/admin.conf</code></p>
