Resource Keys

Workloads request NVIDIA GPUs through a Kubernetes extended resource name advertised by the device plugin.

nvidia.com/gpu

KeyMeaningUnit
nvidia.com/gpuA whole NVIDIA GPU allocated to a containercount

Set it as a resource limit on the container:

resources:
  limits:
    nvidia.com/gpu: 1

Always confirm the key from the live cluster rather than assuming it from the GPU model:

kubectl get node ${nodeName} -o jsonpath='{.status.allocatable}'

MIG resource keys

When MIG is configured with the mixed strategy, MIG instances are advertised as their own keys of the form nvidia.com/mig-<slice_count>g.<memory_size>gb (for example nvidia.com/mig-1g.5gb). With the single strategy, MIG instances are advertised as nvidia.com/gpu. See MIG resources.

HAMi resource keys

GPU sharing and partitioning through HAMi use HAMi-specific resource keys, not nvidia.com/gpu. Those keys are documented in the HAMi documentation.