A team is deploying a multimodal inference service on Kubernetes. Each pod requires one GPU for model execution. The NVIDIA device plugin is installed on the cluster. Which resource request configuration in the pod spec correctly reserves a single GPU for the container?
- ASet resources.requests to cpu: 0 and memory: 0, then annotate the pod with nvidia.com/gpu: 1 in the metadata section.
- BSet resources.limits to gpu: 1 using the standard Kubernetes resource name and omit the vendor prefix entirely.
- CSet resources.requests and resources.limits both to nvidia.com/gpu: 1 under the container spec. Correct
- DSet resources.requests to nvidia.com/gpu: 1 only, leaving resources.limits unset, so the pod can burst beyond one GPU when the node has capacity.
Why A is wrong: Kubernetes annotations are informational metadata and have no effect on resource scheduling. Extended resources like GPUs must appear in the resources block, not as annotations, to be recognised by the scheduler.
Why B is wrong: gpu is not a standard Kubernetes resource name. The NVIDIA device plugin registers GPUs under the vendor-prefixed extended resource nvidia.com/gpu; omitting the prefix means the scheduler cannot locate or allocate the device.
Why C is correct: The NVIDIA device plugin exposes GPUs as the extended resource nvidia.com/gpu. Kubernetes requires that extended resources be specified identically in both requests and limits, so setting both to 1 correctly reserves one GPU for the container.
Why D is wrong: Extended resources in Kubernetes do not support burst behaviour. The scheduler requires that limits equal requests for any extended resource; specifying only a request without a matching limit causes the pod to be rejected at admission.