Why is CNI0 bridge not created when node joins kubernetes cluster with flannel?

1/17/2019

Setting up a new k8s cluster on Centos 7 using flannel as the CNI plugin. When joining a worker to the cluster, the CNI0 bridge is not created.

Environment is kubernetes 13.2.1, Docker-CE 18.09, Flannel 010. Centos 7.4. My understanding is that CNI0 is created by brctl when called by flannel. With docker debug, I can see that the install-cni-kube-flannel container is instantiated. In looking at /var/lib, I do not see that /var/lib/cni directory is created.

I would expect that CNI0 and the /var/lib/cni directory would be created by the install-cni-kube-flannel container. How would I troubleshoot this further ? Are there log capabilities for the CNI interface ?

-- BruceC
cni
flannel
kubernetes

1 Answer

1/18/2019

With further research, I observed that the /var/lib/cni directory on the worker node was not created until I deployed a pod to that node and exposed a service. Once I did that, the CNI plugin was called, /var/lib/cni was created as well as CNI0.

-- BruceC
Source: StackOverflow