BaltoStar
BaltoStar

Reputation: 8997

kubernetes nodes created by status is not ready

Docker Desktop For Windows on WSL2

I'm following the k8s blog here :

https://kubernetes.io/blog/2020/05/21/wsl-docker-kubernetes-on-the-windows-desktop/

and seeing the nodes created but perpetually with Status = NotReady.

x@y:~$ cat << EOF > kind-3nodes.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
  - role: control-plane
  - role: worker
  - role: worker
EOF
x@y:~$ kind create cluster --name wslkindmultinodes --config ./kind-3nodes.yaml
Creating cluster "wslkindmultinodes" ...
 ✓ Ensuring node image (kindest/node:v1.17.0) đŸ–ŧ
 ✓ Preparing nodes đŸ“Ļ đŸ“Ļ đŸ“Ļ
 ✓ Writing configuration 📜
 ✓ Starting control-plane 🕹ī¸
 ✓ Installing CNI 🔌
 ✓ Installing StorageClass 💾
 ✓ Joining worker nodes 🚜
Set kubectl context to "kind-wslkindmultinodes"
You can now use your cluster with:

kubectl cluster-info --context kind-wslkindmultinodes

Thanks for using kind! 😊
x@y:~$ kubectl get nodes
NAME                              STATUS     ROLES    AGE   VERSION
wslkindmultinodes-control-plane   NotReady   master   62s   v1.17.0
wslkindmultinodes-worker          NotReady   <none>   28s   v1.17.0
wslkindmultinodes-worker2         NotReady   <none>   28s   v1.17.0
x@y:~$

It appears that CNI is not initialized :

  Ready            False   Sat, 14 Dec 2024 21:21:43 -0800   Sat, 14 Dec 2024 20:33:42 -0800   KubeletNotReady
    runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized

Apparently route to Docker is linkdown :

johng@X17R1:~$ ip route show
default via 172.25.112.1 dev eth0 proto kernel
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
172.25.112.0/20 dev eth0 proto kernel scope link src 172.25.119.83

Upvotes: 1

Views: 65

Answers (1)

Philippe
Philippe

Reputation: 26727

Try to install a more recent version of kind,

curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind

Upvotes: 1

Related Questions