Using high performance multicast
You can use multicast on your Single Root I/O Virtualization (SR-IOV) hardware network.
Before you perform any tasks in the following documentation, ensure that you installed the SR-IOV Network Operator.
High performance multicast
The OVN-Kubernetes network plugin supports multicast between pods on the default network. This is best used for low-bandwidth coordination or service discovery, and not high-bandwidth applications.
For applications such as streaming media, such as Internet Protocol television (IPTV) and multipoint videoconferencing, you can use Single Root I/O Virtualization (SR-IOV) hardware to provide near-native performance.
When using additional SR-IOV interfaces for multicast:
- Multicast packages must be sent or received by a pod through the additional SR-IOV interface.
- The physical network which connects the SR-IOV interfaces decides the multicast routing and topology, which is not controlled by OpenShift Container Platform.
Configure an SR-IOV interface for multicast
The following procedure creates an example SR-IOV interface for multicast.
Prerequisites
- Install the OpenShift CLI (
oc). - You must log in to the cluster with a user that has the
cluster-adminrole.
Procedure
-
Create a
SriovNetworkNodePolicyobject:apiVersion: sriovnetwork.openshift.io/v1kind: SriovNetworkNodePolicymetadata:name: policy-examplenamespace: openshift-sriov-network-operatorspec:resourceName: examplenodeSelector:feature.node.kubernetes.io/network-sriov.capable: "true"numVfs: 4nicSelector:vendor: "8086"pfNames: ['ens803f0']rootDevices: ['0000:86:00.0'] -
Create a
SriovNetworkobject:apiVersion: sriovnetwork.openshift.io/v1kind: SriovNetworkmetadata:name: net-examplenamespace: openshift-sriov-network-operatorspec:networkNamespace: defaultipam: |{"type": "host-local","subnet": "10.56.217.0/24","rangeStart": "10.56.217.171","rangeEnd": "10.56.217.181","routes": [{"dst": "224.0.0.0/5"},{"dst": "232.0.0.0/5"}],"gateway": "10.56.217.1"}resourceName: example- If you choose to configure DHCP as IPAM, ensure that you provision the following default routes through your DHCP server:
224.0.0.0/5and232.0.0.0/5. This is to override the static multicast route set by the default network provider.
- If you choose to configure DHCP as IPAM, ensure that you provision the following default routes through your DHCP server:
-
Create a pod with multicast application:
apiVersion: v1kind: Podmetadata:name: testpmdnamespace: defaultannotations:k8s.v1.cni.cncf.io/networks: nic1spec:containers:- name: exampleimage: rhel7:latestsecurityContext:capabilities:add: ["NET_ADMIN"]command: [ "sleep", "infinity"]- The
NET_ADMINcapability is required only if your application needs to assign the multicast IP address to the SR-IOV interface. Otherwise, you can omit it.
- The