<p>I have a setup of WSL2 and Kind.</p>
<p>Whenever I restart my computer and open a new WSL2 window, I can no longer use kubectl to access my kind cluster.</p>
<pre><code> kind get clusters

 &gt;&gt;&gt; kind

 kubectl config get-contexts

 CURRENT   NAME         CLUSTER      AUTHINFO     NAMESPACE
    *      kind-kind    kind-kind    kind-kind

 kubectl get pods

 &gt;&gt;&gt; The connection to the server 127.0.0.1:40307 was refused - did you specify the right host or port?`
</code></pre>
<p>However, I can create a new kind cluster and access it.</p>
<pre><code> kind create cluster --name kind3

 kubectl get nodes

 NAME                  STATUS   ROLES           AGE     VERSION
 kind3-control-plane   Ready    control-plane   8m21s   v1.26.3
</code></pre>
<p>But if I restart my computer, once again I will not be able to access the cluster <code>kind3</code></p>
<p>What am I doing wrong? Or what do I need to change in my configuration files to be able to access any old clusters after computer restart?</p>

Kspr
<p>This is a known issue and has been mentioned in the <a href="https://github.com/kubernetes-sigs/kind/issues/3165" rel="nofollow noreferrer">github link</a>. Can you check the WSL2 Version in Powershell or Windows Command Prompt by running <strong><code>wsl -l -v</code></strong> command. WSL2 v1.2.3/1.2.4 has the issue fixed. If the issue still persists with the 1.2.4 version run the following command on admin shell <strong><code>wsl --update --pre-release</code></strong> which has the fixed issue.</p>
