Module for connecting multiple network interfaces (Multus)

The module for connecting multiple network interfaces to modules in Kubernetes (Multus CNI) is a meta-plugin that calls other CNI plugins, such as Flannel, Weave, Calico, Cilium, Macvlan. Using the module, it is possible to create a pod with several network interfaces, for example, eth0, net0, net1.

By default, the module is not installed on clusters. To install the module, in the side menu of the cluster graphical interface, open the Services and repositories section and go to the Available charts page. On the “shturval” tab, find the shturval-metacni chart and click “Install”.

Select the required chart version. After selecting the chart version, the available “Service Configuration Options” (values) will be displayed on the right side of the screen. Enter the required parameters as custom values ​​in the “Service Specification” block.

Please note! The module must be installed in the namespace kube-system.

If you configure network interfaces in the platform GUI, then the following must also be installed and enabled in the cluster:

After installation of the modules is completed, additional networks will become available for configuration in the graphical interface. Read more about SR-IOV resources.

To organize multinetworks with different IP addresses or address ranges, the module (Multus CNI) is integrated with the module for assigning IP addresses on interfaces created by Multus (shturval-metacni-ipam), which must be installed in the cluster. Learn more about how to install module for assigning IP addresses on interfaces.

Please note! If the cluster uses both Cilium CNI and Multus CNI, then prepare and load into the cluster using import manifests ShturvalServicePatch for the Cluster Network Management Module (shturval-networking). In customvalues, set false to cni.exclusive as below.

ShturvalServicePatch
apiVersion: ops.shturval.tech/v1beta2
kind: ShturvalServicePatch
metadata:
  name: shturval-networking-cni
spec:
  shturvalServiceConfigName: shturval-networking
  customvalues:
    cni:
      exclusive: false

Creating additional interfaces

To create an additional interface for use by pods, you must configure a user resource that defines the CNI configuration for the interfaces. This resource is NetworkAttachmentDefinition. Learn more about the additional network resource NetworkAttachmentDefinition.The created NetworkAttachmentDefinitions are connected to the pod in the annotations block, using the k8s.v1.cni.cncf.io/networks parameter.

Example of a pod with additional interfaces connected
apiVersion: v1
kind: Pod
metadata:
  name: podname
  annotations:
    k8s.v1.cni.cncf.io/networks: macvlan-conf, name-conf
spec:
  containers:
  - name: containername
    command: ["/bin/ash", "-c", "trap : TERM INT; sleep infinity & wait"]
    image: alpine

where macvlan-conf and name-conf names NetworkAttachmentDefinitions.