Enable OVS

Setting up OVS network with Pf9 DHCP Server on a PMK cluster

Create a PMK Cluster with the configured worker nodes in the previous section.

PMK cluster should have the following add-ons enabled:

  • KubeVirt Add-on
  • Advanced Networking Operator (Luigi) Add-on

1. Create Network Plugins Custom Resource

Network Plugin customer resource used to install advanced networking plugins such as ovs, sriov, dpdk, etc. and their configuration.

YAML
Copy

DHCP controller plugin

DHCP controller plugin enables running PF9 DHCP server inside pod/virtual machine to cater to the DHCP requests from virtual machine instance(not pod in case of Kubevirt). Multus network-attachment-definitions will use DHCP server to assign IPs. Pf9 DHCP server serves as an alternate to the IPAM CNIs (whereabouts, host-local), which are used as delegate from backend CNI, which gets managed/triggered at pod creation and pod deletion.

Refer for more information: https://platform9.com/docs/kubernetes/enable-p9-dhcp

2. Create Host Network Template

Host Network Template is used to define configuration such as ovs-config etc. on the PMK cluster.

YAML
Copy

ovsCofig parameters:

  • bridgeName : User Defined name of the OVS bridge
  • nodeInterface : Physical Network interface to be used to create ovs-bridge with.

3. Create Network Attachment Definition

Network Attachment Definition is a Multus CRD used to configure additional NIC on pods and virtual machines.

Bash
Copy

4. Create Pf9 DHCP server

Bash
Copy

About the fields:

  • Name: Name of the DHCPServer. Configurations of dnsmasq will be generated in a Configmap with the same name
  • networks: list of all networks that this pod will serve:
    • networkName: Name of NetworkAttachmentDefinition to provide IPs for. NAD should not have dhcp plugin enabled.
    • interfaceIp: IP address that the pod will be allocated. Must have prefix to ensure proper routes are added.
    • leaseDuration: Duration the leases offered should be valid for. Provide in valid formats for dnsmasq (eg: 10m, 5h, etc). Defaults to 1h
    • vlanId: Dnsmasq network identifier. Used as an identifier while restoring IPs. Optional.
    • cidr: range_start, range_end, gateway are optional. range is compulsory. If range start and end are provided, they will be used in place of the default start and end.

At this point the PMK cluster is ready to be used for workloads such as Pods and Virtual Machines.

Create a sample Virtual Machines to use the nad-ovs-dhcp network.

Let’s validate your work by creating a Virtual Machine to consume the nad-ovs-dhcp network.

Bash
Copy

Variations of OVS networks

OVS Bonded network

YAML
Copy

OVS with DPDK

Enable OVS with DPDK

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