How does a Pod get a GPU on Kubernetes?
#You add GPU nodes to a cluster, but Pods requesting GPUs stay Pending.
Show answer
GPUs are advertised as extended resources by a device plugin running on each node, for example nvidia.com/gpu. A Pod requests them in its resource limits, and the scheduler places it on a node with free GPUs. Without the plugin, the scheduler sees no GPUs.
On NVIDIA hardware, the GPU Operator installs and manages the pieces: driver, container toolkit, device plugin, GPU feature discovery labels and the DCGM metrics exporter. Taint GPU nodes so only Pods that tolerate the taint and need GPUs land there.
Trade-offs
The operator simplifies setup but adds components to upgrade alongside the kernel and driver.
Common mistake
Leaving GPU nodes untainted so ordinary Pods fill them.
Follow-up
How would you check that a Pod can actually see its GPU?