<p>I'm using <code>kind</code> to run a test kubernetes cluster on my local Macbook.</p>
<p>I found one of the nodes with status <code>NotReady</code>:</p>
<pre class="lang-sh prettyprint-override"><code>$ kind get clusters                                                                                                                                                                 
mc

$ kubernetes get nodes
NAME                STATUS     ROLES    AGE     VERSION
mc-control-plane    Ready      master   4h42m   v1.18.2
mc-control-plane2   Ready      master   4h41m   v1.18.2
mc-control-plane3   Ready      master   4h40m   v1.18.2
mc-worker           NotReady   &lt;none&gt;   4h40m   v1.18.2
mc-worker2          Ready      &lt;none&gt;   4h40m   v1.18.2
mc-worker3          Ready      &lt;none&gt;   4h40m   v1.18.2
</code></pre>
<p>The only interesting thing in <code>kubectl describe node mc-worker</code> is that the CNI plugin not initialized:</p>
<pre class="lang-sh prettyprint-override"><code>Conditions:
  Type             Status  LastHeartbeatTime                 LastTransitionTime                Reason                       Message
  ----             ------  -----------------                 ------------------                ------                       -------
  MemoryPressure   False   Tue, 11 Aug 2020 16:55:44 -0700   Tue, 11 Aug 2020 12:10:16 -0700   KubeletHasSufficientMemory   kubelet has sufficient memory available
  DiskPressure     False   Tue, 11 Aug 2020 16:55:44 -0700   Tue, 11 Aug 2020 12:10:16 -0700   KubeletHasNoDiskPressure     kubelet has no disk pressure
  PIDPressure      False   Tue, 11 Aug 2020 16:55:44 -0700   Tue, 11 Aug 2020 12:10:16 -0700   KubeletHasSufficientPID      kubelet has sufficient PID available
  Ready            False   Tue, 11 Aug 2020 16:55:44 -0700   Tue, 11 Aug 2020 12:10:16 -0700   KubeletNotReady              runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady
message:Network plugin returns error: cni plugin not initialized
</code></pre>
<p>I have 2 similar clusters and this only occurs on this cluster.</p>
<p>Since <code>kind</code> uses the local Docker daemon to run these nodes as containers, I have already tried to restart the container (should be the equivalent of rebooting the node).</p>
<p>I have considered deleting and recreating the cluster, but there ought to be a way to solve this without recreating the cluster.</p>
<p>Here are the versions that I'm running:</p>
<pre class="lang-sh prettyprint-override"><code>$ kind version                                                                                                                                                                     
kind v0.8.1 go1.14.4 darwin/amd64

$ kubectl version                                                                                                                                                  
Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;16+&quot;, GitVersion:&quot;v1.16.6-beta.0&quot;, GitCommit:&quot;e7f962ba86f4ce7033828210ca3556393c377bcc&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2020-01-15T08:26:26Z&quot;, GoVersion:&quot;go1.13.5&quot;, Compiler:&quot;gc&quot;, Platform:&quot;darwin/amd64&quot;}
Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;18&quot;, GitVersion:&quot;v1.18.2&quot;, GitCommit:&quot;52c56ce7a8272c798dbc29846288d7cd9fbae032&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2020-04-30T20:19:45Z&quot;, GoVersion:&quot;go1.13.9&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
</code></pre>
<p>How do you resolve this issue?</p>

<p>Most likely cause:</p>
<p>The docker VM is running out of some resource and cannot start CNI on that particular node.</p>
<p>You can poke around in the HyperKit VM by connecting to it:</p>
<p>From a shell:</p>
<pre class="lang-sh prettyprint-override"><code>screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty
</code></pre>
<p>If that doesn't work for some reason:</p>
<pre class="lang-sh prettyprint-override"><code>docker run -it --rm --privileged --pid=host alpine nsenter -t 1 -m -u -n -i sh
</code></pre>
<p>Once in the VM:</p>
<pre class="lang-sh prettyprint-override"><code># ps -Af
# free
# df -h
...
</code></pre>
<p>Then you can always update the setting on the docker UI:</p>
<p><a href="https://i.stack.imgur.com/W2Pqu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W2Pqu.png" alt="Image1" /></a></p>
<p>Finally, your node after all is running in a container. So you can connect to that container and see what <code>kubelet</code> errors you see:</p>
<pre class="lang-sh prettyprint-override"><code>docker ps
CONTAINER ID        IMAGE                  COMMAND                  CREATED             STATUS              PORTS                       NAMES
6d881be79f4a        kindest/node:v1.18.2   &quot;/usr/local/bin/entr…&quot;   32 seconds ago      Up 29 seconds       127.0.0.1:57316-&gt;6443/tcp   kind-control-plane
docker exec -it 6d881be79f4a bash
root@kind-control-plane:/# systemctl status kubelet
● kubelet.service - kubelet: The Kubernetes Node Agent
   Loaded: loaded (/kind/systemd/kubelet.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/kubelet.service.d
           └─10-kubeadm.conf
   Active: active (running) since Wed 2020-08-12 02:32:16 UTC; 35s ago
     Docs: http://kubernetes.io/docs/
 Main PID: 768 (kubelet)
    Tasks: 23 (limit: 2348)
   Memory: 32.8M
   CGroup: /docker/6d881be79f4a8ded3162ec6b5caa8805542ff9703fabf5d3d2eee204a0814e01/system.slice/kubelet.service
           └─768 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet
/config.yaml --container-runtime=remote --container-runtime-endpoint=/run/containerd/containerd.sock --fail-swap-on=false --node-ip= --fail-swap-on=false
...
</code></pre>
<p>✌️</p>
