kubernetes: How to view or list the installed CNI addons?
Asked Answered
H

1

18

Suppose, I just installed one of the Kubernetes CNI plugins, for example weave-net:

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

How can I view or list the installed CNI plugins?

After installing how do I know that it is running? Or if I kubectl delete the plugin, how do I know it was deleted?

After installing the plugin, I sort of expected to see some objects created for this plugin. So that if I want to delete it, then I don't have to remember the exact URL I used to install, I could just lookup the object name and delete it.

Heavyarmed answered 5/9, 2019 at 23:45 Comment(0)
C
14

if you list the pods in kube-system namespace, you can see the pods. The pod's names will be started with weave-net-xxxxx. Since it is Deamonset object, the pod's count will be based on your k8s nodes. Actually one pod will be created for one node.

kubectl get pods -n kube-system
Chere answered 6/9, 2019 at 4:40 Comment(1)
In addition to this answer you can also check which one you have by running command ls /etc/cni/net.d. It will show your cni's conf.Camm

© 2022 - 2024 — McMap. All rights reserved.