Why GPUs require Kubernetes extensions

Modern data centers rely heavily on Graphics Processing Units (GPUs) to accelerate massively parallel computations in AI, deep learning training, inference, and scientific simulations (PDF p. 3 / printed slide 3). While CPUs optimize general-purpose sequential tasks, a GPU’s massive core count processes thousands of threads simultaneously.

Core Kubernetes only schedules standard compute resources (CPU and memory). To expose specialized hardware such as GPUs, high-speed NICs, or FPGAs without hardcoding vendor drivers into Kubernetes itself, Kubernetes relies on the Device Plugin Framework (PDF p. 4 / printed slide 4):

  1. A vendor’s device plugin registers with the node’s kubelet and advertises local hardware devices.
  2. kubelet reports the count of healthy devices to the API server, updating the node’s status.
  3. Users request those devices in Pod manifests just like CPU or memory:
apiVersion: v1
kind: Pod
spec:
  containers:
    - name: cuda-app
      resources:
        limits:
          nvidia.com/gpu: 1   # Request 1 GPU

Analogy: a translator at the hotel front desk (and its limit)

Think of a device plugin as a hardware translator talking to the node’s front desk (kubelet). Kubernetes only knows how to count CPU and RAM, so NVIDIA’s plugin announces “this node has 4 healthy GPUs,” and the scheduler places Pods requesting nvidia.com/gpu: 1 accordingly. Unlike hotel rooms, however, the plugin only handles advertising and allocation—it does not automatically install kernel drivers or CUDA libraries on the machine.

Why manual GPU management fails

Even with a device plugin, managing the GPU software stack manually across cluster nodes is error-prone (PDF p. 4 / printed slide 4). Every GPU node must keep three layers strictly matched:

  • NVIDIA kernel drivers,
  • Container runtimes (containerd or CRI-O), and
  • CUDA libraries.

Version drift between nodes produces inconsistent environments and runtime application failures whenever a Pod is scheduled onto a mismatched host.

Automation via the NVIDIA GPU Operator

To eliminate manual node setup, the NVIDIA GPU Operator applies the standard Kubernetes Operator pattern (see Kubernetes Extensibility CRDs Operators Webhooks and Drivers) on top of a uniform Gold Master Image (Linux + Container Engine + Kubernetes; PDF pp. 5–9 / printed slides 5–9). It centrally deploys, upgrades, monitors, and validates the complete GPU software stack:

ComponentResponsibilityOperational benefit
Driver Manager (PDF p. 6)Installs and upgrades NVIDIA drivers inside a container (one containerized driver per node)Keeps the host OS clean and makes driver deployments reproducible
NVIDIA Container Toolkit (PDF p. 7)Integrates with the container runtime (containerd, CRI-O)Mounts GPU device nodes and libraries into application containers so workloads can access hardware
NVIDIA Device Plugin (PDF p. 8)Advertises healthy GPUs to kubelet and allocates devices to PodsEnables standard Kubernetes scheduling on nvidia.com/gpu
GPU Feature Discovery (GFD) (PDF p. 8)Labels nodes with GPU model, memory capacity, and driver versionLets Pods target specific hardware (e.g., matching GPU memory or generation)
DCGM (Data Center GPU Manager, PDF p. 9)Collects deep GPU performance and health telemetry and exports metrics to PrometheusReal-time cluster-wide GPU utilization visibility (see Observability Metrics and Prometheus)
Lifecycle & Validator Pods (PDF p. 9)Automates upgrades/remediation and runs validator pods after installationProves CUDA works end to end before production AI workloads land on the node

The One-GPU-Per-Pod constraint

Even when the GPU Operator works cleanly, default Kubernetes device-plugin scheduling creates a severe cost bottleneck (PDF p. 10 / printed slide 10):

  • Kubernetes manages GPUs as indivisible integer units (1, 2, etc.—fractional requests are not supported natively).
  • If a Pod requests nvidia.com/gpu: 1 for a small job such as light inference or model prototyping, it claims the entire physical GPU (such as an expensive H100 or H200), blocking all other Pods from using that card.
  • Empirical studies cited in the lecture show many data center GPUs run at only ~30% of total capacity, creating a massive capital cost premium and motivating the sharing mechanisms in GPU Sharing and Partitioning - Time-Slicing MPS and MIG.

Common confusions

  • Containerized driver ≠ per-app driver version: The Driver Manager deploys one containerized NVIDIA driver per worker node to keep the host Linux OS clean—individual AI containers still share that node’s kernel driver.
  • Container Toolkit vs. GFD: The Container Toolkit wires GPU devices and libraries into the container runtime; GFD adds metadata labels to the Kubernetes Node so the scheduler knows which GPUs sit where.
  • One-GPU-Per-Pod ≠ One-GPU-Per-Node: A single server node can hold multiple GPUs; the default problem is that one Pod requesting nvidia.com/gpu: 1 locks an entire physical card exclusively for itself.

Retrieval

  1. A cluster admin runs 40 identical GPU worker nodes from a clean Linux + containerd + Kubernetes Gold Master Image using the NVIDIA GPU Operator. Why does the Driver Manager run drivers in containers, and how do the Container Toolkit and GFD divide responsibilities?
    Running drivers in containers keeps the host OS clean and makes driver installation/upgrades reproducible across all 40 nodes. The Container Toolkit configures containerd to mount GPU device nodes and libraries into application containers, whereas GPU Feature Discovery (GFD) labels Kubernetes Nodes (model, memory, driver version) so the scheduler can place Pods accurately.
  2. Trace how a Pod requesting nvidia.com/gpu: 1 gets matched to hardware and validated before workloads rely on the node.
    The NVIDIA Device Plugin registers with kubelet, kubelet updates the Node’s healthy GPU count in the API server, and the scheduler places the Pod onto a node with an available unit; on setup, the GPU Operator’s validator pods verify CUDA execution and DCGM exports ongoing metrics to Prometheus.
  3. Why do expensive data center GPUs like the H100/H200 average roughly 30% utilization under default Kubernetes scheduling?
    Because the default Device Plugin treats GPUs as indivisible integer resources, any Pod requesting nvidia.com/gpu: 1 reserves an entire physical GPU for its lifetime—even when lightweight inference or prototyping uses only a small fraction of compute and memory.

Source: Lecture 17 - AI in Kubernetes, PDF pages 2–10 (printed slides 2–10).