Luigi Networking Quickstart

Prerequisites

  • Kubernetes v1.17+
  • Calico CNI
  • Privileged Pods
  • MetalLB is not deployed.
  • Every worker node should have an additional NIC/port up and running with no IP address assigned to it, if intended for IPVLAN/L2 and MACVLAN, or an additional interface with an IP address for IPVLAN/L3.

Luigi Installation

Download the Luigi Operator definition to your master node or from where you are able to execute kubectl commands against this cluster. (A local copy of the manifest is at the end of the document.)

Then install it by using the following command:

Bash
Copy

Luigi Install Validation

After executing the command above, validate the installation using the following command. Please consider that some of the pods may take some time to fully be up.

Bash
Copy

Luigi Networking Plugins

Luigi Networking Plugins Installation (hostPlumber)

The sampleplugins.yaml manifest will deploy CNI plugins. The different components are going to deployed as daemon sets and will run in every node including workers and masters.

Create a namespace hostplumber for the resources related to the hostplumber pod.

Bash
Copy

Apply the following YAML (uncomment as applicable to your environment) to choose and install the required Luigi plugins.

sampleplugins.yaml
Copy

As you may have observed, all the plugins are commented out but HostPlumber. First, we will install the HostPlumber plugin and revisit this manifest later and re-apply it with the rest of the CNI plugins uncommented after creating our first HostNetworkTemplate object. HostPlumber is not required, but it provides a mechanism to configure SR-IOV and host networking, as well as view the node SR-IOV and interface state via a K8s operator. If you’re configuring host networking and SR-IOV VFs thru other means, the HostPlumber plugin is not needed and can be skipped.

The reason we deploy this first, is that the SR-IOV CNI requires VF and network configuration to be done first before deploying the SR-IOV plugin.

Execute the following command to install HostPlumber plugin:

YAML
Copy

Luigi Networking Plugins Install Validation (hostPlumber)

After executing the command above, let’s review our work.

Bash
Copy

Luigi HostNetworkTemplate Object

HostNetworkTemplate will help us enable the desired number of VFs in our nodes as well which driver will be loaded on the newly enabled VFs.

The nodeSelector feature performs SR-IOV configurations only on SR-IOV capable nodes.

Note: NFD plugin (Node Feature Discovery) should be installed first in order to leverage the label: feature.node.kubernetes.io/network-sriov.capable: "true".

For example:

YAML
Copy

In this definition, we are creating two HostNetworkTemplates – one for SR-IOV using vfio-pci drivers and the other one SR-IOV using kernel drivers. The first one will only configure the VFs on nodes that has the following 3 criteria: SR-IOV capable, a PF called enp3s0f1 and a label with key-value to testlabelA: "123".

The second will attempt to configure 4 VFs with the ixgbevf drive across all the nodes no matter what labels they have.

It is also possible to merge the two sriovConfig ’s for the two interfaces into the same HostNetworkTemplate CRD, rather than a separate one for each PF. For example:

YAML
Copy

Configuring via vendor and device ID

The above will search for all interfaces matching vendor ID 8086 (Intel) and device ID 1528 (representing a particular model of NIC). It will then create 32 VFs on each matching device and bind all of them to the vfio-pci (DPDK driver). This might be useful if you don’t know the interface naming scheme across your hosts or PCI addresses, but you just want to target all particular NIC by vendor and device ID.

YAML
Copy

Configuring via PCI address

YAML
Copy

The above will configure 32 VFs on PF matching PCI address “0000:03:00.0” and 32 VFs on PCI address “0000:03.00.1”, for a total of 64 VFs, and bind each VF to the vfio-pci driver.

HostNetwork CRD

This is not to be confused with the status section of the HostNetworkTemplate CRD. (For latter phases, each Node will append its nodename and the success/failure of application of the HostNetworkTemplate policy to the Status section.)

The HostNetwork CRD, which is different, will not be created by the user. Instead, this is intended to be a read-only CRD and the DaemonSet operator on each node will discover and populate various host settings to this CRD:

  • Created: First upon the HostPlumber plugin being deployed.
  • Updated: After each application of the HostNetworkTemplate CRD.
  • For Phase 3 and later: Monitored as a periodic task, updating and discovering host changes.

There will be one HostNetwork CRD automatically created for each node. The Name will correspond to the Node’s name, which in PMK is the IP.

Bash
Copy

Fetching the first Node in -o yaml reveals:

YAML
Copy

This node just has one interface, eth0, using virtio driver. This node happens to be an OpenStack VM. Let’s look at a bare metal SR-IOV node.

YAML
Copy

There are 2 interfaces. Each of them has 4 VFs. For each PF, and each VF underneath, you can see the device and vendor IDs, PCI addresses, driver enabled, MAC address allocated (if assigned to a Pod), VLAN, and other Link level information.

In future phases, more information will be reported such as IP information, ip-route information, and other networking related host-state.

Validate Luigi HostNetworkTemplate Object (hostPlumber)

Bash
Copy

Luigi Networking Plugins Installation (multus, sriov, whereabouts, and nodeFeatureDiscovery)

Let’s revisit sampleplugins.yaml

Create a namespace hostplumber for the resources related to the hostplumber pod.

Bash
Copy

Uncomment the rest of the lines as appropriate for your environment and reapply the manifest, this will install Multus, SR-IOV and Whereabouts.

Bash
Copy
YAML
Copy

Validate Luigi Networking Plugins Installation (Multus, SR-IOV, Whereabouts and nodeFeatureDiscovery ).

Let’s review our work by listing the new DaemonSets created in the kube-system namespace.

Bash
Copy

Note: The kube-sriov-device-plugin-amd64 pods will be in CreatingContainer or Pending state since the sriov-config-map hasn’t been created. The sriov-config-map is created in the SR-IOV section of this document.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated