Kubernetes in Docker KinD - Node notready

572 Views Asked by At

I'm following this article https://kubernetes.io/blog/2020/05/21/wsl-docker-kubernetes-on-the-windows-desktop/ but I'm facing and issue.

So Windows 10, WSL2 enabled with Ubuntu 22.04 and Docker Desktop.

Using Kind I tried to create a cluster using the command: kind create cluster --name wslkind

But after that, a kubectl get nodes shows:

NAME                    STATUS     ROLES    AGE     VERSION
wslkind-control-plane   NotReady   master   8m22s   v1.17.0

A describe is giving this reason:

Ready            False   Thu, 29 Dec 2022 21:14:54 +0100   Thu, 29 Dec 2022 21:02:26 +0100   KubeletNotReady              runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized

I don't know how to fix that issue.

I'm expecting a ready status of the nodes

1

There are 1 best solutions below

0
DrCyclotron On

I gave up with WSL + Docker Desktop. Instead I installed Docker Engine on Ubuntu directly on the wsl and no issue anymore.

sudo apt-get update
sudo apt-get remove -t docker docker-engine docker.io containerd runc
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get install -y docker-ce docker-ce-cli containerd.io