<p>I have recently installed minikube and kubectl. However when I run <code>kubectl get pods</code> or any other command related to kubectl I get the error</p>

<p><code>Unable to connect to the server: unexpected EOF</code></p>

<p>Does anyone know how to fix this?I am using Ubuntu server 16.04.Thanks in advance.</p>

<p>The following steps can be used for further debugging.<br/> </p>

<ol>
<li><p>Check the minikube local cluster status using <code>minikube status</code> command.</p>

<pre><code> $: minikube status
 minikube: Running
 cluster: Running
 kubectl: Correctly Configured: pointing to minikube-vm at 172.0.x.y
</code></pre></li>
<li><p>If problem with kubectl configuratuion,then configure it using, <code>kubectl config use-context minikube</code> command.</p>

<pre><code>$: kubectl config use-context minikube
Switched to context "minikube".
</code></pre></li>
<li><p>Check the cluster status, using <code>kubectl cluster-info</code> command.</p>

<pre><code>$: kubectl cluster-info
Kubernetes master is running at ...
Heapster is running at ...
KubeDNS is running at ...
...
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
</code></pre></li>
</ol>

<p>Note: It can even be due to very simple reason: internet speed (it happend to me just now). </p>
