<p>Earlier today I had increased my Docker desktop resources, but when ever since it restarted Kubernetes has not been able to complete its startup.  Whenever I try to run a kubectl command, I get <code>Unable to connect to the server: EOF</code> in response.</p>

<p>I had thought that it started because I hadn't deleting a helm chart before adjusting the resource values in Settings, thus said resources having been assigned to the pods instead of the Kubernetes api server.  But I have not been able to fix this issue.</p>

<p>This is what I have tried thus far:</p>

<ul>
<li>Restarting Docker again</li>
<li>Reset Kubernetes</li>
<li>Reset Docker to factory settings</li>
<li>Deleting the VM in hyper-v and restarting Docker</li>
<li>Uninstalling and reinstalling Docker Desktop</li>
<li>Deleting the pki folder and restart Docker</li>
<li>Set the Environment Variable for KUBECONFIG</li>
<li>Deleting .kube/config and restart</li>
<li>Another clean reinstall of Docker Desktop</li>
</ul>

<p>But Kubernetes does not complete its startup, so I still get <code>Unable to connect to the server: EOF</code> in response.</p>

<p>Is there anything I haven't tried yet?</p>

shenyongo
<p>I'll share that what solved this for me was Docker Desktop settings feature for &quot;<strong>reset kubernetes cluster</strong>&quot;. I know that @shenyongo said that a &quot;reset kubernetes&quot; didn't work, and I suppose they mean this.</p>
<p>But <strong>for the sake of other readers who may find this</strong>, I had this same error message (with Docker Desktop on Windows 11, using wsl2), and the solution for me was indeed to do this:</p>
<ol>
<li>open the Settings page (in Docker Desktop--right-click on it in the status tray)</li>
<li>then choose &quot;Kubernetes&quot; on the left</li>
<li>then choose &quot;reset kubernetes cluster&quot;</li>
</ol>
<p>Yes, that warns that &quot;all stacks and kubernetes resources will be deleted&quot;, but as nothing else had worked for me (and I wasn't worried about losing much), I tried it, and it did the trick. In moments, all my k8s functionality was back to working.</p>
<p>As background, k8s had been working fine for me for some time. It was just that one day I found I was getting this error. I searched and searched and found lots of folks asking about it but not getting answers, let alone this answer. To be clear, like the OP here I had tried restarting Docker Desktop, restarting the host machine, even downloading and installing an available DD update (I was only a bit behind), and none of those worked. I didn't proceed to ALL the steps shenyongo did, as I thought I'd try this first, and the reset worked.</p>
<p>Hope that may help others. I realize some may fear losing something, but this helps stress the power of declarative vs imperative k8s configuration. It SHOULD be easy to recreate most everything if necessary. I realize it may not be so for everyone.</p>
