
Simulate your GPU infrastructure on CPU nodes.
Mokka¶
Mokka turns any Kubernetes cluster into a multi-GPU environment for testing.
It implements the NVIDIA driver interfaces that GPU software talks to, so the
device plugin, the DRA driver, the GPU Operator and nvidia-smi all behave as
though real hardware were present. No physical NVIDIA GPU is required.
-
Quick Start
Install into a KIND cluster and see simulated GPUs in five minutes.
-
Architecture
How the mock NVML library, the CGo bridge and the GPU profiles fit together.
-
Demos
Six runnable walkthroughs, from a standalone install to NVSentinel health monitoring.
-
Configuration
Every YAML knob: profiles, topology, failure injection and dynamic metrics.
Try it¶
kind create cluster --name mokka
helm install nvml-mock oci://ghcr.io/nvidia/k8s-test-infra/chart/nvml-mock \
--namespace mokka --create-namespace
Use make cluster-create instead of kind create cluster when you need the
CDI-enabled Kind node image — that is what the device plugin, DRA driver and
GPU Operator paths run on. make cluster-delete tears it down.
The Helm chart guide has the full walkthrough for each consumer, including the device plugin, the DRA driver, the GPU Operator and a multi-node heterogeneous fleet.
How it fits together¶

Components¶
| Component | Description | Status |
|---|---|---|
Mock NVML (libnvidia-ml.so) |
400 NVML C API exports (111 with configurable behavior, 289 stubs), YAML-configurable GPU profiles | Production |
| nvidia-smi | Real binary with RPATH patch, backed by mock NVML | Production |
| Helm Chart | DaemonSet deployment with 7 GPU profiles | Production |
| CDI Injection | Container Device Interface specs for GPU Operator | Production |
GPU profiles¶
| Profile | GPU Name | VRAM | Architecture |
|---|---|---|---|
gb300 |
GB300 NVL | 288 GiB | Blackwell Ultra |
gb200 |
GB200 | 192 GiB | Blackwell |
b200 |
B200 | 192 GiB | Blackwell |
h100 |
H100 80GB HBM3 | 80 GiB | Hopper |
a100 |
A100-SXM4-40GB | 40 GiB | Ampere |
l40s |
L40S | 48 GiB | Ada Lovelace |
t4 |
Tesla T4 | 16 GiB | Turing |
Tested consumers¶
| Consumer | Role | Status |
|---|---|---|
| NVIDIA Device Plugin | nvidia.com/gpu extended resources |
Tested |
| NVIDIA DRA Driver | Dynamic Resource Allocation | Tested |
| NVIDIA GPU Operator | Full stack device plugin, GFD and validator | Tested |
| GPU Feature Discovery | Node labeling from NVML | Tested |
Integrations¶
| Integration | Description |
|---|---|
| fake-gpu-operator | Run:ai's K8s-level GPU simulation plus nvml-mock driver fidelity |