Skip to content
Hands-on course · 16 days

GPU infrastructure on Kubernetes hands-on

You run a GPU platform for several AI teams – fairly shared, monitored and with a procedure for GPU failures.

  • Free · no subscription
  • 16 days · 60–90 min each
  • 121 drills · with expected output
Day 1 · Drill 3: What the NRI Plugin Attached
$ kubectl -n tag01 exec alle -- sh -c 'ls /dev | grep nvidia'

Expected

nvidia-uvm
nvidia-uvm-tools
nvidia0
nvidia1
nvidia2
nvidia3
nvidia4
nvidia5
nvidia6
…

What you'll be able to do

  • Bring GPU nodes into a cluster with the device plugin, feature discovery, taints and the GPU Operator, and share GPUs with time-slicing and MIG
  • Allocate GPUs with Dynamic Resource Allocation – ResourceSlices, DeviceClasses, claims, CEL selectors and the classic nvidia.com/gpu path on top
  • Enforce per-team quotas with Kueue and configure borrowing, reclaiming and priorities
  • Monitor GPUs with DCGM Exporter, Prometheus and Grafana, classify Xid errors and cordon, repair and uncordon a GPU node cleanly

What you need

LabOne VM with Ubuntu 24.04 and Docker – in the lab 4 vCPU, 8 GB RAM and at least 30 GB of free disk, running a three-node kind cluster

GPUNone – NVIDIA Mokka simulates eight A100s, the real NVIDIA and Kubernetes software runs on top

Prior knowledgeThe book is for DevOps and platform engineers and Kubernetes admins who are to run GPU nodes for AI teams. You should be comfortable with pods, deployments, Helm and kubectl; no machine learning or CUDA knowledge needed.

Set up your labKubernetes locally · Lab VMs

Training plan

One day = one sitting. Every day ends with a checkpoint and a challenge. About 21 hours in total.

Training days

  1. Day 0 The Training GroundBuild a kind cluster with CPU and GPU nodes, provide simulated A100 GPUs with Mokka, and understand what is real about it and what is not 60 min
  2. Day 1 How a GPU Gets into the ContainerUnderstand which files, devices and variables a container needs to see a GPU, and who gives them to it: NRI, CDI and the driver root 60 min
  3. Day 2 The Device PluginInstall the NVIDIA Device Plugin, schedule GPUs as the resource nvidia.com/gpu, and understand how the kubelet hands out each GPU exactly once 60 min
  4. Day 3 Node Feature Discovery and GPU Feature DiscoveryHave GPU nodes detected and labeled automatically, and schedule Pods by GPU model, memory and architecture 60 min
  5. Day 4 Reserving GPU NodesKeep regular workloads off GPU nodes, admit GPU workloads deliberately, and use PriorityClasses to decide who has to give way when capacity runs short 60 min
  6. Day 5 Sharing GPUs with Time-SlicingGive one GPU to several Pods at the same time, know the limits of sharing, and configure it so that nobody accidentally gets more than they think 60 min
  7. Day 6 MIG – Cutting a GPU into Real PiecesSplit A100 GPUs into separate instances with Multi-Instance GPU (MIG), offer them as resources with the single and mixed strategies, and understand the hardware's placement rules 75 min
  8. Day 7 The GPU OperatorStop maintaining the device plugin, GFD, DCGM Exporter and validator one by one, and let the NVIDIA GPU Operator manage them through a ClusterPolicy 75 min
  9. Day 8 Dynamic Resource Allocation IStop handing out GPUs as the counter nvidia.com/gpu and use Dynamic Resource Allocation instead: the driver describes each device in a ResourceSlice, a workload requests what it needs through a ResourceClaim, and the scheduler finds the matching device 75 min
  10. Day 9 Dynamic Resource Allocation IIDRA for real workloads: claim templates for Deployments, one claim shared by several Pods, selecting GPUs by their properties with CEL, and a priority list “H100 preferred, otherwise A100” 75 min
  11. Day 10 Kueue I – GPU Quotas per TeamThree AI teams get fixed GPU quotas. Jobs wait in a queue instead of clogging the scheduler as Pending Pods, and Kueue admits them only when the quota is sufficient. You also see how to get around Kueue and how to recognize a job that will never start 75 min
  12. Day 11 Kueue II – Borrowing, Reclaiming, PrioritiesThe teams from Day 10 become a cohort: other teams may borrow a team's unused GPUs, and whoever needs their quota back gets it via preemption. Borrowing limits and priorities determine who has to give way and when 75 min
  13. Day 12 GPU MonitoringCollect the DCGM Exporter's metrics with Prometheus, evaluate them with PromQL, display them in Grafana and build alerts from them. Along the way, check honestly what mapping GPUs to Pods under DRA achieves in the lab, and expose an alert that can never fire 90 min
  14. Day 13 GPU FailuresGPUs fail, and they fail differently from CPUs: with Xid events, memory errors or completely. You let Mokka simulate these failures, see how the driver, DRA, exporter and alerts react, and work through the procedure for taking a node out of service, repairing it and returning it 90 min
  15. Day 14 A Model on the ClusterRun a small language model as a service on the cluster: Deployment, Service, resources, measuring response speed. Then send the same application with a GPU request to the GPU node and take an honest look at what a simulated GPU means for a model, and what would be different on real hardware 75 min

More