Skip to content

Quick Start

Install Mokka on a Kubernetes cluster and watch nvidia-smi report GPUs that do not exist. Five minutes, no NVIDIA hardware.

Prerequisites

  • Helm 3.8 or newer — the chart is served from an OCI registry.
  • kubectl, pointed at the cluster you want to use
  • Docker and Kind, only if you want a throwaway, local cluster

Install

kind create cluster --name mokka \
    --image ghcr.io/nvidia/mokka-kind-node:latest

helm install nvml-mock \
    oci://ghcr.io/nvidia/k8s-test-infra/chart/nvml-mock \
    --namespace mokka \
    --create-namespace

Already have a cluster? Skip the kind line for the basic Mokka DaemonSet. Managed clusters need additional runtime preparation before ordinary workloads can request and consume simulated GPUs; see the Amazon EKS guide for a validated setup.

latest follows Mokka's main branch and is the simplest way to try it. For repeatable CI, select a published release tag or digest from the mokka-kind-node package instead.

Verify

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-...)

That is the real nvidia-smi binary, unmodified, reading Mokka's driver instead of a physical one. nvidia-smi -q works too, and reports the full profile.

Change the GPU model

gb300 is the default. Every node in the cluster takes the same profile:

helm upgrade nvml-mock \
    oci://ghcr.io/nvidia/k8s-test-infra/chart/nvml-mock \
    --namespace mokka \
    --set gpu.profile=a100

Seven profiles ship with the chart: a100, b200, gb200, gb300, h100, l40s and t4. Configuration covers what each one defines and how to change individual values.

Clean up

helm uninstall nvml-mock --namespace mokka
kind delete cluster --name mokka          # if you created one above

Next steps

You have a node that looks like it has GPUs. The interesting part is pointing real software at it.

To do this Go to
Schedule GPU workloads with the device plugin, DRA or the GPU Operator Installation
Break a GPU and watch consumers react Failure injection
Give a pod GPUs without changing its spec Node-wide injection
Change temperature, power or health on a running node Runtime control
Understand what is actually happening Architecture

The published KIND node image includes the NVIDIA container runtime and enables the Container Device Interface (CDI) in containerd. This is the runtime setup used by the device plugin, DRA, and GPU Operator paths. On a managed cluster, runtime support is provider- and node-image-specific; the Amazon EKS guide shows the required worker bootstrap.