How can I find easily which CNI plugin is configured and where is the config file associated with it?
Asked
Active
Viewed 2,395 times
1 Answers
2
You can look into the content in /etc/cni/net.d
and the binary at /opt/cni/bin
. If you don't find any of these, you can check kubelet argument --cni-conf-dir
and --cni-bin-dir
which will point you to the custom location of your CNI plugin.

gohm'c
- 13,492
- 1
- 9
- 16
-
This is the question. How do I check the cni-conf-dir and cni-bin-dir ? I have seen that you can pass them as arguments to kubelet, but what it means "you can check kubelet argument .." ? – maiky Oct 27 '21 at 14:53
-
1you can find your kubelet arguments [here](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/kubelet-integration/#workflow-when-using-kubeadm-init) – gohm'c Oct 27 '21 at 15:03
-
:) still, how does this answer the question: how can I "check kubelet argument --cni-conf-dir and --cni-bin-dir", as this link says to check configmap kubelet-config-1.X, /etc/kubernetes/kubelet.conf, /var/lib/kubelet/kubeadm-flags.env etc. , but none of them is giving any cni-bin-dir of cni-conf-dir.. – maiky Oct 27 '21 at 15:21
-
the link already told you what's the default when none is explicitly specified. – gohm'c Oct 27 '21 at 15:27
-
I think I understand the question, @maiky You need to ssh to your Kubernetes Node, and on the OS itself there should be located kubelet binary, as well as the config files. – Cloudziu Oct 27 '21 at 16:30
-
1@maiky You can select a running kubelet process and check its `--cni-conf-dir` and `--cni-bin-dirusing` flags with:`ps -ef | grep kubelet` – Andrew Skorkin Oct 28 '21 at 11:18