<p>Running <code>kubectl get pods</code> with sudo:</p>

<pre><code>sudo kubectl get pods
The connection to the server localhost:8080 was refused - did you specify the right host or port?
</code></pre>

<p>Running as a normal user:</p>

<pre><code>kubectl get pods
No resources found.
</code></pre>

<p>By default, kubectl looks in ~/.kube/config (or the file pointed to be $KUBECONFIG) to determine what server to connect to. Your home directory and environment are different when running commands as root. When no connection info is found, kubectl defaults to localhost:8080</p>
