Test the GPU stack without GPU hardware using NVIDIA Mokka, then run it on the NVIDIA DSX Air simulation platform.
AI factories bring together some of the most advanced infrastructure in the data center, but integrating every layer remains challenging. Before clusters can be put into operation, the platform teams need to validate that the GPUs are not just brought up but are ready to run the workloads. This process involves answering questions such as:
- Does the GPU Operator install and validate against this driver version and GPU profile?
- Does each node report the NVLink domain that topology-aware scheduling depends on?
- When a GPU indicates an Xid 79 error, has the correct GPU been flagged on the correct node?
- Do ResourceClaims allocate and release as expected?
These are questions operations teams usually need to answer on real hardware, after it has arrived. NVIDIA Mokka is an open source project that simulates NVIDIA GPU infrastructure on CPU nodes in Kubernetes. With Mokka running on the NVIDIA DSX Air platform, teams can answer these questions before production deployment. They can simulate the AI factory before delivery, rehearsing bring-up, validating configurations, and testing failure handling.
This post walks through how to use NVIDIA Mokka to test the Kubernetes GPU stack without GPU hardware, and how to run it in an NVIDIA DSX Air simulation. If you build or operate software that discovers, schedules on, or monitors GPUs, such as a device plugin, a DRA driver, a health monitor, or a remediation controller, you can run it against simulated GPUs in CI or in a shared lab. The post covers how Mokka works, what DSX Air adds, example use cases, and how to get started.
What is NVIDIA Mokka? #
NVIDIA Mokka is an Open Source project that simulates GPUs, SuperNICs, and switch fabrics on ordinary CPU nodes, so the Kubernetes software stack can be tested without any NVIDIA hardware. For the source, visit NVIDIA/k8s-test-infra. For documentation, visit nvidia.github.io/k8s-test-infra.
Note that Mokka is not a GPU emulator: it does not run CUDA kernels or move data. Instead, it simulates the interfaces between GPUs and higher-level software, allowing the stack to run unmodified and unaware of the simulation.
How Mokka simulates a GPU node #
GPU software finds and monitors GPUs by reading NVML, sysfs, device nodes, and kernel-module state. Mokka serves those surfaces from a GPU profile, so the same software can run on a CPU node and react to simulated GPU state.
On each CPU node, the Mokka node agent stages:
- A mock
libnvidia-ml.sothat answers NVML calls from a GPU profile instead of a driver - A PCI tree and
sysfshierarchy where the GPUs appear - Driver and kernel-module footprints under
/procand/sys, includingnvidia,nvidia_uvm, andmlx5_core - CDI specs, device nodes, NVLink and Fabric Manager state, IMEX for multi-node NVLink, and InfiniBand devices
The real, unmodified nvidia-smi can therefore run on a CPU node and report four NVIDIA GB300 NVL72 Blackwell GPUs, representing one compute tray of a GB300 NVL72 rack, with matching NVLink topology and rack position. The NVIDIA device plugin, DRA driver, DCGM, node feature discovery, topograph, Slurm through Slinky, NVSentinel, and GPU Operator interact with the same files and libraries they use on real nodes.
Running Mokka on NVIDIA DSX Air #
On its own, Mokka turns a laptop or CI runner into a small simulated GPU cluster. But many of the failures worth catching need a network fabric, a realistic topology, and more hosts than fit on a desk. This is where the NVIDIA DSX Air platform comes in.
DSX Air logically simulates a complete AI factory ecosystem. It models NVIDIA Spectrum-X network topology, ecosystem software, and server images controlled through a Python SDK or REST API.
Running Mokka inside DSX Air adds GPUs to the simulation. DSX Air maps servers to switches, while Mokka assigns each node’s GPUs to NVLink domains and cliques, driving IMEX and DRA ComputeDomains. When both describe the same racks, schedulers see realistic placement distances.
Network teams already using DSX Air for fabric validation can add Mokka to server nodes and create a GPU cluster from the same simulation. File-based, API-driven simulations can be checkpointed before destructive tests, shared by link, scaled through topology edits, and managed by CI. They also let SREs and new team members practice remediation without production access.
This approach provides a number of advantages, including:
- Repeatable tests: Define the topology and GPU profiles in files, then use checkpoints to return to a known state after a test.
- Shared environments: Give colleagues, partners, and support engineers access to the same simulation so they can investigate the same configuration.
- Reuse existing simulations: Add Mokka to the server nodes in a DSX Air network lab to test GPU cluster software alongside the fabric.
- Larger test fleets: Expand the simulated topology on CPU-backed infrastructure and compare GPU profiles, such as H100 and GB300, without reserving physical GPUs.
- Training and fault testing: Let engineers practice remediation, onboarding, and qualification workflows in an isolated environment.
- Pipeline automation: Create a simulation, install the stack, inject faults, and tear it down through APIs as part of your CI workflow.
Example use cases for running Mokka on DSX Air
Use case examples for running Mokka on DSX Air include rehearsing failures, finding scale limits early, testing Day 2 changes in a pipeline, and comparing designs.
Rehearsing failures
Teams set a GPU to lost, fallen_off_bus, or ecc_uncorrectable, queue an Xid**,** and verify that remediation controllers cordon, drain, or page appropriately. DCGM, dcgm-exporter, Prometheus, and Grafana run unmodified, testing alerts and dashboards alongside the controller.
Finding scale limits early
Every stack component has a scale limit. Expanding a simulated fleet from 36 nodes to 288, 1,152, and 2,304 reveals which processes grow with it. The bottleneck is often not Kubernetes, but a single-replica labeler, MongoDB memory limit, or conntrack table.
Testing Day 2 changes in a pipeline
Remediation policies, configuration changes, and topology edits affect running clusters, so teams often batch them into maintenance windows. Because every simulation step is an API call, changes can instead move through a pipeline:
- A pull request proposes the change, such as an NVSentinel policy, a device plugin setting, or a topology edit.
- DSX Air builds the fleet from the committed topology, Mokka stages GPUs on every node, and the current production stack is installed.
- The pipeline applies the change and verifies that health monitoring catches an injected Xid 79 on the correct node, GPU claims allocate and release properly, and nodes carry the expected labels.
- The simulation is deleted.
The Mokka CI works this way on standard CPU runners, with jobs for DRA, ComputeDomains, the GPU Operator, multinode, NRI injection, NFD, MIG, and vGPU.
Comparing designs
Rack layouts and NVLink domain boundaries are expensive to change after cabling. Comparing simulated topologies reveals scheduler placement and rack-failure impact while changes remain simple file edits.
How to get started with NVIDIA Mokka #
This section walks through four steps. Steps 1-3 run on a local Kind cluster and need no NVIDIA hardware: install Mokka, check the simulated GPUs, and inject a failure. Step 4 launches a Mokka lab in NVIDIA DSX Air without requiring Steps 1-3.
Step 1: Install Mokka on a local cluster
You need Helm 3.8 or later and kubectl. To create a local cluster, you also need Docker and Kind.
First, create a Kind cluster and install the chart:
kind create cluster --name mokka
helm install nvml-mock \
oci://ghcr.io/nvidia/k8s-test-infra/chart/nvml-mock \
--namespace mokka --create-namespace
Any cluster whose nodes run containerd 1.7 or later under systemd works as well.
Step 2: Check the simulated GPUs
Next, check the simulated GPUs:
kubectl exec -n mokka ds/nvml-mock -- nvidia-smi -L
GPU 0: NVIDIA GB300 NVL (UUID: GPU-...)
GPU 1: NVIDIA GB300 NVL (UUID: GPU-...)
GPU 2: NVIDIA GB300 NVL (UUID: GPU-...)
GPU 3: NVIDIA GB300 NVL (UUID: GPU-...)
Eight profiles ship with the chart: a100, b200, gb200, gb300, h100, l40s, t4, and vrnvl72. Set gpu.profile to switch between them.
Step 3: Inject a failure
nvml-mock-ctl changes GPU state on a running node without a redeploy. This command marks GPU 0 with an uncorrectable ECC error and delivers Xid 79:
kubectl exec -n mokka ds/nvml-mock -- \
nvml-mock-ctl fail --gpu 0 --mode ecc_uncorrectable --xid 79
The device plugin marks the GPU unhealthy, DCGM exports the Xid, and nvidia-smi shows the error. With Prometheus and Grafana installed, the fault shows up on the same dashboards used in production.
Step 4: Move to DSX Air
The DSX Air integration is delivered through two DSX Air demo marketplace environments (Table 1). Launching a demo creates a copy in your DSX Air account, and its documentation covers credentials and cluster access.
Sign in with your NGC account. Each user needs the Air User or Air Org Admin role in the organization. After you launch a demo, wait until the simulation’s Topology tab shows Active. Then open the console of the node named in the lab instructions to learn and build the digital twin.
The Mokka on DSX Air guide walks through the rest, including saving a checkpoint to resume later.
| Demo | Use |
|---|---|
| Kubernetes Intro: Mokka plus KWOK Configured | Explore a cluster that is already set up |
| Kubernetes Intro: Mokka plus KWOK Unconfigured | Work through the setup using the lab instructions |
Table 1. Mokka demos in the DSX Air Demo Marketplace
Get started validating your AI factory software stack #
By combining NVIDIA Mokka with NVIDIA DSX Air, teams can test the GPU software stack, network topology, failure handling, and Day 2 changes in a realistic simulated environment before physical infrastructure is available. This approach moves critical validation earlier, when problems are easier and less costly to fix. Simulation does not replace real hardware testing, but it can dramatically improve readiness for it. The software stack can be ready when the racks arrive.
Ready to get started? To design, build, and operate the Kubernetes GPU stack without the hardware, log in to NVIDIA DSX Air and launch the Kubernetes Intro: Mokka plus KWOK lab on the marketplace. Launching a demo creates a copy in your account, and the demo’s Documentation tab lists credentials and cluster access.
To learn more:
- Visit the NVIDIA/k8s-test-infra GitHub repo for NVIDIA Mokka
- Check out the Mokka on DSX Air guide
- Read the related blog post, Design, Simulate, and Scale AI Factory Infrastructure with NVIDIA DSX Air
- Get more details about GPU Operator ,DRA driver ,failure injection ,NVSentinel , andCI/CD