Monitor GPU Utilization with DCGM Exporter and Grafana
Advanced · 60 minutes · 5 tasks, checked automatically · 100 points
In this advanced MLOps lab you will build a complete GPU observability stack on a local Kubernetes cluster using NVIDIA DCGM Exporter (simulated for CPU-only kind nodes), Prometheus, and Grafana. Because kind nodes do not have physical GPUs, you will not run the real DCGM Exporter; instead a lightweight Python emitter publishes metrics with the same names, labels and port as `dcgm-exporter`, filled with random values (they are not measurements of any GPU), wire it into Prometheus via a ServiceMonitor, and finally visualise the metrics in Grafana — mirroring exactly what you would do on a real GPU cluster. By the end of the lab you will have a production-style monitoring pipeline: namespace isolation, Helm-based deployments of the kube-prometheus-stack, a DCGM-compatible metrics emitter, a Grafana dashboard, and end-to-end verification of the scrape pipeline.
What you’ll learn
- Deploy the kube-prometheus-stack (Prometheus + Grafana) via Helm into a dedicated monitoring namespace
- Deploy a DCGM-compatible GPU metrics emitter and expose it as a Prometheus scrape target via a ServiceMonitor
- Verify the full observability pipeline by confirming Prometheus scrapes GPU metrics and Grafana can query them
How this lab works
- Start the lab: One click starts a real Kubernetes cluster on your computer (kind), with kubectl ready in a toolbox terminal.
- Work through 5 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work reads your live cluster and says, task by task, what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Cluster: A real Kubernetes cluster on your computer (kind)
- Kubernetes: 1.34.8
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- Docker Desktop installed and running
- A kind cluster created in the Kubernetes Playground
Topics: kubernetes, mlops, gpu, dcgm, prometheus, grafana, monitoring, helm, observability, nvidia
Create a free account to start this lab.