Installing the Multus Plug-in
The Multus Container Network Interface (CNI) plug-in is a third-party tool for attaching multiple network interfaces (with static or dynamic IP addresses) to a pod. In a Network Enabler (NE) deployment, you use it to attach static IP addresses to the NE pod.
MATRIXX Support recommends using the Multus plug-in when NEs are installed to improve NE performance. For information about installing Multus itself, see the Multus CNI documentation.
After installing Multus, add the Multus custom resource definition to create the network interfaces. A Kubernetes NetworkAttachmentDefinition specification is included in the release that
defines an mtx-vlan
NetworkAttachmentDefinition object.
Using the Multus plug-in improves performance when Network Enablers are installed in the Kubernetes cluster. To
enable Multus and create the mtx-vlan
NetworkAttachmentDefinition, enable the Multus sub-chart and feature in a Helm values file as shown in the following excerpt:
# enables multus-cni feature
features:
multus-cni: true
# Enables multus-cni sub-chart
multus-cni:
enabled: true
You can define one or more additional networks to connect to the NE pod from the network. All the properties in the CNI object are required for each network and you must set values for them that are appropriate to your deployment. For more information about the CNI properties, see the discussion about Network Enabler topology configuration in MATRIXX Configuration.
The following Helm values file excerpt shows CNI configuration for an additional network. Addresses are assigned dynamically between 10.194.231.0 and 10.194.231.26 using the Whereabouts plug-in:
# define the cni network
global:
topology:
networkEnabler:
totalPodCount: 2
portRangeStart: 29101
secondaryNetworks:
- cni:
cniVersion: 0.3.1
type: macvlan
master: bond0
ipam:
type: whereabouts
range: 10.194.231.0/26
externalAddresses:
- 10.10.136.207
- 10.10.136.208
The CNI configuration is used to populate the spec.config
property of the Kubernetes NetworkAttachmentDefinition object. For information about the different configuration
options, such as IP address management (IPAM), see the discussion about configuring an additional network at the OpenShift website.
CNI configuration can be provided as a JSON string or a YAML object (which is converted into a JSON string by Helm).
kubectl
to verify the network interfaces have been
created:kubectl get network-attachment-definitions -n namespace
NAME AGE
mtx-vlan 68s
where namespace is the namespace into which NEs are being deployed.