Page cover
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Implementation

Step 1: Prepare the YAML manifest

apiVersion: v1
kind: Pod
metadata:
  name: h100-rdma-test
  namespace: default
spec:
  runtimeClassName: nvidia
  nodeSelector:
    nvidia.com/gpu.product: NVIDIA-H100-80GB-HBM3
  securityContext:
    runAsNonRoot: true
    runAsUser: 1000
  containers:
    - name: cuda
      image: nvidia/cuda:12.4.1-base-ubuntu22.04
      command: ["sh", "-c", "nvidia-smi && sleep 3600"]
      securityContext:
        allowPrivilegeEscalation: false
        runAsNonRoot: true
        runAsUser: 1000
      resources:
        requests:
          nvidia.com/gpu: 1
          rdma/ib_shared_device: 1
        limits:
          nvidia.com/gpu: 1
          rdma/ib_shared_device: 1

Step 2: Deploy the Pod

Use kubectl to apply the manifest with the following command:

You will see the following output:

Step 3: Monitor the deployment

Check the Pod status.

The output should look like this.

Wait until the status changes to Running. If the status shows Pending, there is a scheduling issue.

Step 4: Verify GPU access

After the Pod is running, check the nvidia-smi logs with the following command.

The output should look like this, which confirms that the GPU is detected and mounted in the container.

Last updated