2

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.

3 Answers3

3

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

3

My issue was that I was using the command below to setup the Calico CNI:

kubectl apply -f https://docs.projectcalico.org/v3.9/manifests/calico.yaml

Using the link below instead worked. It's the same without the version I guess.

kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
steoiatsl
  • 1,892
  • 2
  • 22
  • 39
0

Install Tigera Operator

kubectl create -f https://projectcalico.docs.tigera.io/manifests/tigera-operator.yaml

Install Calico by creating the necessary custom resource

kubectl create -f https://projectcalico.docs.tigera.io/manifests/custom-resources.yaml

Now Watch the nodes running and bring up core dns pod too.

Yuvraj
  • 1