Open rihib opened 3 weeks ago
Hi did you copy the base cni plugins on your node?
mkdir -p /opt/cni/bin
curl -O -L https://github.com/containernetworking/plugins/releases/download/v1.2.0/cni-plugins-linux-amd64-v1.2.0.tgz
tar -C /opt/cni/bin -xzf cni-plugins-linux-amd64-v1.2.0.tgz
@rbrtbnfgl Hello, thank you for your reply. Yes, I copied here.
$ wget https://github.com/containernetworking/plugins/releases/download/v1.5.0/cni-plugins-linux-arm64-v1.5.0.tgz
$ mkdir -p /opt/cni/bin
$ sudo tar Cxzvf /opt/cni/bin cni-plugins-linux-arm64-v1.5.0.tgz
Could you check the Flannel pod status? Are there any errors on the logs?
@rihib
kubectl -n kube-system get pod -o wide
ls -l /etc/cni/net.d
ls -l /opt/cni/bin/
journalctl -xe --no-pager -u kubelet
@rbrtbnfgl @zhangguanzhang Sorry for the late reply. Here are results. Is there anything that might be causing this error?
$ kubectl -n kube-system get pod -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
coredns-5dd5756b68-fbtjv 0/1 Pending 0 11m <none> <none> <none> <none>
coredns-5dd5756b68-kd65q 0/1 Pending 0 11m <none> <none> <none> <none>
etcd-raspi4-claster-2 1/1 Running 1 2m30s 192.168.0.12 raspi4-claster-2 <none> <none>
kube-apiserver-raspi4-claster-2 1/1 Running 1 12m 192.168.0.12 raspi4-claster-2 <none> <none>
kube-controller-manager-raspi4-claster-2 1/1 Running 1 12m 192.168.0.12 raspi4-claster-2 <none> <none>
kube-proxy-mj9l2 1/1 Running 0 11m 192.168.0.12 raspi4-claster-2 <none> <none>
kube-scheduler-raspi4-claster-2 1/1 Running 1 12m 192.168.0.12 raspi4-claster-2 <none> <none>
kube-vip-raspi4-claster-2 1/1 Running 3 12m 192.168.0.12 raspi4-claster-2 <none> <none>
$ ls -l /etc/cni/net.d
total 4
-rw-r--r-- 1 root root 292 Jun 19 03:35 10-flannel.conflist
$ ls -l /opt/cni/bin/
total 82900
-rwxr-xr-x 1 root root 4211373 May 20 16:23 bandwidth
-rwxr-xr-x 1 root root 4689829 May 20 16:23 bridge
-rwxr-xr-x 1 root root 11032310 May 20 16:23 dhcp
-rwxr-xr-x 1 root root 4396899 May 20 16:23 dummy
-rwxr-xr-x 1 root root 4877629 May 20 16:23 firewall
-rwxr-xr-x 1 root root 2606310 Jun 19 03:35 flannel
-rwxr-xr-x 1 root root 4311205 May 20 16:23 host-device
-rwxr-xr-x 1 root root 3657185 May 20 16:23 host-local
-rwxr-xr-x 1 root root 4402954 May 20 16:23 ipvlan
-rw-r--r-- 1 root root 11357 May 20 16:23 LICENSE
-rwxr-xr-x 1 root root 3738212 May 20 16:23 loopback
-rwxr-xr-x 1 root root 4414239 May 20 16:23 macvlan
-rwxr-xr-x 1 root root 4135970 May 20 16:23 portmap
-rwxr-xr-x 1 root root 4573489 May 20 16:23 ptp
-rw-r--r-- 1 root root 2343 May 20 16:23 README.md
-rwxr-xr-x 1 root root 3924968 May 20 16:23 sbr
-rwxr-xr-x 1 root root 3181821 May 20 16:23 static
-rwxr-xr-x 1 root root 4421646 May 20 16:23 tap
-rwxr-xr-x 1 root root 3829309 May 20 16:23 tuning
-rwxr-xr-x 1 root root 4400609 May 20 16:23 vlan
-rwxr-xr-x 1 root root 4034926 May 20 16:23 vrf
$ sudo journalctl -xe --no-pager -u kubelet
Jun 19 03:46:41 raspi4-claster-2 kubelet[1919761]: E0619 03:46:41.752432 1919761 remote_runtime.go:222] "StopPodSandbox from runtime service failed" err="rpc error: code = Unknown desc = failed to destroy network for sandbox \"df6fc759598e52c6d0dc3e4a4a2c3c2d9d1b9a5071747e0799a3c73a4eb0301d\": cni plugin not initialized" podSandboxID="df6fc759598e52c6d0dc3e4a4a2c3c2d9d1b9a5071747e0799a3c73a4eb0301d"
Jun 19 03:46:41 raspi4-claster-2 kubelet[1919761]: E0619 03:46:41.752544 1919761 kuberuntime_gc.go:180] "Failed to stop sandbox before removing" err="rpc error: code = Unknown desc = failed to destroy network for sandbox \"df6fc759598e52c6d0dc3e4a4a2c3c2d9d1b9a5071747e0799a3c73a4eb0301d\": cni plugin not initialized" sandboxID="df6fc759598e52c6d0dc3e4a4a2c3c2d9d1b9a5071747e0799a3c73a4eb0301d"
Jun 19 03:46:41 raspi4-claster-2 kubelet[1919761]: E0619 03:46:41.754692 1919761 remote_runtime.go:222] "StopPodSandbox from runtime service failed" err="rpc error: code = Unknown desc = failed to destroy network for sandbox \"cdd291f7c9e536d2e4a77ad9cafbd8077049857a89434b691aed7817cef1e066\": cni plugin not initialized" podSandboxID="cdd291f7c9e536d2e4a77ad9cafbd8077049857a89434b691aed7817cef1e066"
Jun 19 03:46:41 raspi4-claster-2 kubelet[1919761]: E0619 03:46:41.754811 1919761 kuberuntime_gc.go:180] "Failed to stop sandbox before removing" err="rpc error: code = Unknown desc = failed to destroy network for sandbox \"cdd291f7c9e536d2e4a77ad9cafbd8077049857a89434b691aed7817cef1e066\": cni plugin not initialized" sandboxID="cdd291f7c9e536d2e4a77ad9cafbd8077049857a89434b691aed7817cef1e066"
Jun 19 03:46:41 raspi4-claster-2 kubelet[1919761]: E0619 03:46:41.756898 1919761 remote_runtime.go:222] "StopPodSandbox from runtime service failed" err="rpc error: code = Unknown desc = failed to destroy network for sandbox \"524badb9894492a17595b9969e05d12d73b86d2fed9f456218c6ed32a5796dba\": cni plugin not initialized" podSandboxID="524badb9894492a17595b9969e05d12d73b86d2fed9f456218c6ed32a5796dba"
Jun 19 03:46:41 raspi4-claster-2 kubelet[1919761]: E0619 03:46:41.757014 1919761 kuberuntime_gc.go:180] "Failed to stop sandbox before removing" err="rpc error: code = Unknown desc = failed to destroy network for sandbox \"524badb9894492a17595b9969e05d12d73b86d2fed9f456218c6ed32a5796dba\": cni plugin not initialized" sandboxID="524badb9894492a17595b9969e05d12d73b86d2fed9f456218c6ed32a5796dba"
Jun 19 03:46:42 raspi4-claster-2 kubelet[1919761]: E0619 03:46:42.189594 1919761 kubelet.go:2900] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Jun 19 03:46:47 raspi4-claster-2 kubelet[1919761]: E0619 03:46:47.191622 1919761 kubelet.go:2900] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Jun 19 03:46:52 raspi4-claster-2 kubelet[1919761]: E0619 03:46:52.194754 1919761 kubelet.go:2900] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Jun 19 03:46:57 raspi4-claster-2 kubelet[1919761]: E0619 03:46:57.197184 1919761 kubelet.go:2900] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Jun 19 03:47:02 raspi4-claster-2 kubelet[1919761]: E0619 03:47:02.199441 1919761 kubelet.go:2900] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Jun 19 03:47:07 raspi4-claster-2 kubelet[1919761]: E0619 03:47:07.202054 1919761 kubelet.go:2900] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Jun 19 03:47:12 raspi4-claster-2 kubelet[1919761]: E0619 03:47:12.204257 1919761 kubelet.go:2900] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Jun 19 03:47:17 raspi4-claster-2 kubelet[1919761]: E0619 03:47:17.205603 1919761 kubelet.go:2900] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Should I run kubectl apply -f https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml
after kubeadm init
and kubeadm join
?
Should I run
kubectl apply -f https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml
afterkubeadm init
andkubeadm join
?
yes, According to the command output, there is no flannel container deployed under your kube-system
Expected Behavior
Pod status becomes Running.
Current Behavior
The pod status was always Not Ready and the error
container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized
was seen.Possible Solution
Steps to Reproduce (for bugs)
Here are all the commands I ran.
Context
I want to create K8s HA cluster for my project.
Your Environment