Understanding Multus CNI
January 13, 2022
As we know that Kubernetes supports a single network interface! For the implementation of Kubernetes networking model, it is needed to implement multiple network interfaces with the help of some networking approach that comes with unique multi-networking features.
You can consider Multus CNI as the methodology for implementing multi-network interfaces in Kubernetes. Basically, Multus CNI is a Kubernetes CNI plugin that enables creating additional pod network interfaces in Kubernetes and supporting multi-networking features with the help of CRD objects in Kubernetes. The Multus Container Network Interface manages multiple container network interfaces in Kubernetes.
Role of Multus CNI:
Multus CNI is an open-source plug-in that helps in enabling multi-interface support by serving as a supplementary layer in a container network. It attaches multiple network interfaces to pods in Kubernetes. You might know that Kubernetes has only one network interface by default! Through Multus, it is easy to create multi-homes pods with multiple network interfaces.
- Multus CNI helps in managing contacts between container runtime and plugins.
- Multus doesn’t allow net configuration by itself, it is dependent on other types of plugins.
- It supports almost all types of reference plugins including Flannel that can implement CNI specifications.
- It also provides support for third-party plugins including Weave, Calico, Contiv, and Cilium too.
- Moreover, it allows to attach DPDK/SRIOV interfaces to pods to support network intensive workloads
Operation & Working of Multus CNI:
Multus serves as an arbiter of other CNI plugins. It invokes Flannel, Calico, vHost CNI, or SR-IOV to create network interfaces. However, while configuring Multus, one plugin should be identified as the master plugin to configure and manage eth0 (primary network interface).
To understand the working of Multus, it is crucial to dive deep into how Kubernetes networking functions operate. There are two network plugins available such as CNI plugins (implement CNI specification to serve interoperability) and Kubelet (primary agent to implement basic bridge cbr0 with host-local CNI plugin).
Kubelet runs on each node in the Kubernetes cluster. Kubelet allows registering the node with the control panel of the Kubernetes and also, renders effective lifecycle management to pods that are scheduled to run on that node one after the another. It also establishes network interfaces for each pod.
Kubelet utilizes a Multus CNI configuration file to set up the network of each pod. Here, Kubelet is configured to use Container Network Interface as its networking plugin. Kubelet calls its container runtime when it is invoked to set up a pod. For network configuration, Kubelet provides a network plugin wrapper (Multus CNI plugin) to the container runtime.
Multus CNI can be utilized with network objects, configuration files, or a combination of both files and objects. It reads the configuration and offloads tasks of network setting to other CNI plugins, aka delegates.
To know more about Multus CNI, discuss with our Engineers.
Write your query at email@example.com