Hey everyone, I have been stuck at this problem for a few days. I have been do . . .

tomk8slearn:
hey everyone, I have been stuck at this problem for a few days. I have been doing the practice test in SECTION 11 in the CKA Exam: “INSTALL, PRACTICE TEST CLUSTER INSTALLATION USING KUBEADM”
I am trying to bootstrap a kubernetes cluster with kubeadm. I am now very close, but stuck at getting Weave net pod running for the worker node somehow. It’s stuck at

root@node01:~# kubectl -n kube-system logs weave-net-fg9bc weave
Error from server (BadRequest): container "weave" in pod "weave-net-fg9bc" is waiting to start: PodInitializing
root@node01:~# kubectl -n kube-system logs weave-net-fg9bc weave-npc
Error from server (BadRequest): container "weave-npc" in pod "weave-net-fg9bc" is waiting to start: PodInitializing

the weave net pod for the control plane is happy. I don’t know why. There is not much information to debug.

Below is the log of kubelet on the worker node.

Oct 28 13:59:58 node01 kubelet[12807]: E1028 13:59:58.735525   12807 kubelet.go:2337] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized"
Oct 28 14:00:01 node01 kubelet[12807]: I1028 14:00:01.367636   12807 cni.go:239] "Unable to update cni config" err="no networks found in /etc/cni/net.d"

the log lines above might be just due to the weave pods not runnning successfully yet?

Anyone has a clue?

tomk8slearn:

oot@controlplane:~# kubectl -n kube-system get pods                  
NAME                                   READY   STATUS                  RESTARTS      AGE
coredns-78fcd69978-9xc2t               1/1     Running                 0             24m
coredns-78fcd69978-w2hgv               1/1     Running                 0             24m
etcd-controlplane                      1/1     Running                 0             24m
kube-apiserver-controlplane            1/1     Running                 0             24m
kube-controller-manager-controlplane   1/1     Running                 0             24m
kube-proxy-7wkf5                       1/1     Running                 0             24m
kube-proxy-qjbq2                       1/1     Running                 0             24m
kube-scheduler-controlplane            1/1     Running                 0             24m
weave-net-fg9bc                        0/2     Init:CrashLoopBackOff   9 (81s ago)   22m
weave-net-rr2hx                        2/2     Running                 1 (22m ago)   22m

tomk8slearn:
looks like it’s issue with initcontainer. still looking

root@node01:~# docker logs 0ee4c838687e
standard_init_linux.go:219: exec user process caused: no such file or directory

comma in docker ps -a is “/home/weave/init.sh”

Michal Dziewiatka:
can you show events ?

unnivkn:
If weave not works, could you please try with flannel

tomk8slearn:
yeah, weave not working somehow. will give flannel a try.

init container shows the same log. not helping. google search says this could be issue with docker file I think should not be the case for me.

root@controlplane:~# kubectl -n kube-system logs weave-net-nv8gz -c weave-init
standard_init_linux.go:219: exec user process caused: no such file or directory

events

root@controlplane:~# kubectl -n kube-system get events | grep nv
7m18s       Normal    Scheduled           pod/weave-net-nv8gz                        Successfully assigned kube-system/weave-net-nv8gz to node01
7m17s       Normal    Pulling             pod/weave-net-nv8gz                        Pulling image "<http://docker.io/weaveworks/weave-kube:2.8.1|docker.io/weaveworks/weave-kube:2.8.1>"
7m13s       Normal    Pulled              pod/weave-net-nv8gz                        Successfully pulled image "<http://docker.io/weaveworks/weave-kube:2.8.1|docker.io/weaveworks/weave-kube:2.8.1>" in 3.874459143s
5m33s       Normal    Created             pod/weave-net-nv8gz                        Created container weave-init
5m32s       Normal    Started             pod/weave-net-nv8gz                        Started container weave-init
5m34s       Normal    Pulled              pod/weave-net-nv8gz                        Container image "<http://docker.io/weaveworks/weave-kube:2.8.1|docker.io/weaveworks/weave-kube:2.8.1>" already present on machine
2m13s       Warning   BackOff             pod/weave-net-nv8gz                        Back-off restarting failed container
7m18s       Normal    SuccessfulCreate    daemonset/weave-net                        Created pod: weave-net-nv8gz

tomk8slearn:
I chose weave simply because that’s the only one with the commands on the k8s docs

tomk8slearn:
so hopefully no such issue in the actual Exam

tomk8slearn:
flannel worked! and it was super easy! @unnivkn YOU ARE THE MAN!

1 Like

tomk8slearn:
thank you so much. no idea why weave was having issues

unnivkn:
you have many network plugins here: https://kubernetes.io/fr/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#pod-network

unnivkn:
CKA exam cluster with CNI below., and CNI will be pre-installed.
image.png

tomk8slearn:
that’s really useful info. I am glad it will be preinstalled. Thanks man

1 Like

Hey Guys,

I am also facing the same issue , Weave not working but flannel is working fine .

Anyone got the solution ?

PS: I am using windows Laptop and doing these in Oracle virtual box with vagrant.

Hi @Aravind-C
What kind of issue are you facing in weave network plugin?

Regards,
KodeKloud Support

Hi Tej,

Its the same issue mentioned in the thread , my weave pod on worker node is in the status “Init:CrashLoopBackOff” .

checked the logs of the init container of the weave pod the error is"standard_init_linux.go:228: exec user process caused: exec format error" .

Because of the init container throwing error ,weave pod is stuck in initializing state.

Flannel is working fine