SR-IOV NIC Passthrough Bonding
When using the Bond-CNI plugin, add the following fields to the YAML file of the service application Pod. Use k8s.v1.cni.cncf.io/networks: in annotations to specify the network to be used, and specify the resource huawei.com/huawei_bond_device: '1' in the container declaration.
apiVersion: v1
kind: Pod
metadata:
name: bond-test
annotations:
k8s.v1.cni.cncf.io/networks: bond-net1
spec:
containers:
- name: nginx-1
image: nginx:latest
imagePullPolicy: IfNotPresent
command: [ "/bin/sh", "-c", "--" ]
args: [ "while true; do sleep 300000; done;" ]
resources:
requests:
cpu: "1"
memory: "16Gi"
huawei.com/huawei_bond_device: "1"
limits:
cpu: "1"
memory: "16Gi"
huawei.com/huawei_bond_device: "1"
Parent topic: Plugin Usage