1
votes

I uninstalled calico using: 'kubectl delete -f calico.yaml'

and installed weave using: 'export kubever=$(kubectl version | base64 | tr -d '\n')' 'kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$kubever"'

When i deploy my pods they remain at "ContainerCreating" status. When i check pod logs i see error below:

'networkPlugin cni failed to set up pod "saccofrontend-d7444fd6d-998gf_default" network: stat /var/lib/calico/nodename: no such file or directory: check that the calico/node container is running and has mounted /var/lib/calico/'

I manually deleted this file. A reinstall of docker and kubeadm did not help either.Still getting the same error.

Please advise what could be promting kubelet to still use calico as the cni even though i unstialled it.

1
have you tried deleting /etc/cni/net.d directory before installing weave? - Arghya Sadhu
Hi, what k8s version do You have? Also what platform and infrastructure do You use? - Piotr Malec
Running v1.18.0 on Centos 8.One master and two workers. - Tariq Kipkemei
I will try deleting the /etc/cni/net.d directory before installing weave tomorrow morning and see if that will solve the issue.Thanks - Tariq Kipkemei

1 Answers

3
votes

thank you for pointing me in the right direction: These cmds solved the problem: rm -rf /var/lib/cni rm -rf /etc/cni/net.d

then re-installed kubeadm