In this lab, we will explore how CNI is set up.
We talked about the Weave plugin in the previous video,
but that's just one example.
Let's see what is the CNI plugin
that's configured in this particular lab scenario?
First, inspect the kubelet service
and identify the network plugin configured for Kubernetes.
Let's explore the kubelet service.
We're going to do ps aux, and we'll grep for kubelet.
For kubelet, it's a lot of information,
let's also filter down to network or network plugin.
As you can see here, we have the network plugin and it is CNI.
CNI is a network plugin that's configured.
Let's select CNI.
Now, what is the path configured
with all binaries of CNI-supported plugins?
We know that CNI stores its plugins at OPT CNI bin, I think.
This is where it stores
all the executables and binaries for the supported plugins.
That's OPT, CNI bin.
Now, identify which of the below plugins
is not available in the list of available CNI plugins on the host.
If you look at this, we have Bridge, we have DHCP, we have Cisco--
We don't have Cisco, we have VLAN.
What we don't have here is Cisco.
That's
the one.
Now, what is the CNI plugin configured to be used on this Kubernetes cluster?
Let's look into the etc configured directory of CNI.
ETC is cni/net.t.
Here we see that the configured plugin is flannel so select flannel.
Now, what binary executable file will be
run by kubelet after a container and its associated namespace are created?
If you look into this file, has additional information.
If you look at the plugins that are configured here,
the first one is flannel.
That's, the binary that's going to be executed.
It said, "Multiple plugins configured."
The first one is flannel and then it runs the port map.
The answer to this question is flannel.
That's a quick introduction
on how and where you should look for information regarding the CNI plugin.