Skip to content
StackDecode
AdvancedLesson 34 of 35

GPUs and ML workloads

Schedule training and inference on GPU nodes.

GPU nodes need the NVIDIA driver and the NVIDIA device plugin (or GPU Operator), which advertises nvidia.com/gpu as a schedulable resource.

yaml
resources:
  limits:
    nvidia.com/gpu: 1
tolerations:
  - key: nvidia.com/gpu
    operator: Exists
    effect: NoSchedule
  • Use Jobs for training and Deployments (with an autoscaler) for inference.
  • Taint GPU nodes so only GPU workloads land there.
  • Higher-level tools: Kubeflow, Ray (KubeRay), KServe, Volcano for batch scheduling.
  • GPUs are requested in whole units unless you use time-slicing, MIG or similar sharing.