Using RDMA in Workloads¶
This chapter mainly introduces how to configure and use RDMA resources in workloads.
Note
This chapter is based on the example of using RoCE network cards with SR-IOV. To facilitate RDMA testing, the configured image should be docker.io/mellanox/rping-test, and the sh command should be run to prevent the Pod from exiting abnormally during the operation. Please refer to the following content for details.
Prerequisites¶
- SpiderPool has been successfully deployed
- RDMA installation and preparation have been completed
- Multus CR has been created
- IP Pool has been created
UI Operations¶
-
Log in to the platform UI, click
Container Management->Cluster Listin the left navigation bar, find the corresponding cluster. Then, selectDeploymentsin the left navigation bar and clickCreate Image.
-
On the
Create Deploymentpage, use the imagedocker.io/mellanox/rping-test. SetReplicato2to deploy a group of cross-node Pods. -
Fill in the
Basic Informationand enter the following information in theContainer Configuration.
-
Network Resource Parameters:-
When using RDMA based on Macvlan/VLAN CNI, the resource name is the custom name created in RDMA Installation and Preparation when creating Spiderpool. For more information, please refer to Exposing RoCE Network Card based on Macvlan/IPVLAN.
-
When using RDMA based on SRIOV CNI, the resource name is the
resourceNamedefined inSriovNetworkNodePolicy. For more information, please refer to Using RoCE Network Card based on SR-IOV.
The
spidernet.io/mellnoxrdmain the example is an example of using RoCE network cards based on SR-IOV. The request and limit values are currently consistent, and the input value should not exceed the maximum available value. -
-
Run Command: To prevent the Pod from starting and exiting abnormally, add the following run command:para - sh - -c - | ls -l /dev/infiniband /sys/class/net sleep 1000000
-
-
After completing the information input on the
Container ConfigurationandService Configurationpages, go toAdvanced Configurationand click to configureContainer Network.
-
Select the created Multus CR, turn off the fixed IP pool creation function, select the created IP Pool, and click
OKto complete the creation.