状态创建的kubernetes节点未就绪

问题描述 投票:0回答:1

WSL2 上适用于 Windows 的 Docker 桌面

我正在关注 k8s 博客:

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

并看到节点已创建,但状态永久 =

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:~$

CNI 似乎未初始化:

  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
kubernetes nodes windows-subsystem-for-linux docker-desktop kubernetes-cluster
1个回答
0
投票

尝试安装更新版本的

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
© www.soinside.com 2019 - 2024. All rights reserved.