apiVersion: v1
kind: Pod
metadata:
  name: rdma-gpu-test-pod-1
  annotations:
    k8s.v1.cni.cncf.io/networks: rdma-net-ipam
    # If a network with static IPAM is used replace network annotation with the below.
    # k8s.v1.cni.cncf.io/networks: '[
    #   { "name": "rdma-net",
    #     "ips": ["192.168.111.101/24"],
    #     "gateway": ["192.168.111.1"]
    #   }
    # ]'
spec:
  nodeSelector:
    # Note: Replace hostname or remove selector altogether
    kubernetes.io/hostname: worker01
  restartPolicy: OnFailure
  containers:
  - image: mellanox/cuda-perftest
    name: rdma-gpu-test-ctr
    securityContext:
      capabilities:
        add: [ "IPC_LOCK" ]
    resources:
      limits:
        nvidia.com/gpu: 1
        rdma/rdma_shared_device_a: 1
      requests:
        nvidia.com/gpu: 1
        rdma/rdma_shared_device_a: 1
