Module 1: Fake GPU Cluster Setup

The fake-gpu-operator is a lightweight Kubernetes operator that simulates NVIDIA GPUs on CPU-only nodes. It provides a device plugin, metrics exporter, and nvidia-smi emulation — everything Kubernetes needs to schedule GPU workloads without real hardware.

The good news is that everything you learn in this module can be applied to a real GPU cluster. The commands and output that you see in this module are the same as you would see in a real GPU cluster. You’ll be able to inspect the GPU topology, deploy pods with fake GPUs, and use nvidia-smi inside fake GPU pods.

All of the workloads we deploy in this module do nothing but sleep — they are simply used to verify that the fake GPUs are working as expected. Even the nvidia-smi command used to verify that the fake GPUs are working is a fake nvidia-smi command injected into the pod by the fake-gpu-operator. Within a pod, there is no real nvidia GPU device or socket to connect to — it is all simulated.

In this module, you’ll explore how the operator works, inspect the simulated GPU topology, and verify that pods can request and consume fake GPU resources.

Learning objectives

By the end of this module, you’ll be able to:

  • Explain how the fake-gpu-operator simulates GPU resources

  • Inspect the GPU topology configured on your cluster

  • Deploy a pod that requests fake GPU resources

  • Use nvidia-smi inside a fake GPU pod

The exercises below use the NVIDIA GB200 NVL profile. If you are not using this profile, you will need to switch to it using the GPU Config Plugin. See the Quickstart module for more details. You may use other profiles if you wish - however you will need to adjust the commands accordingly.

How does the fake-gpu-operator work?

Fake GPU Operator Components

The operator runs three main components on each labeled node:

Component Purpose

Device Plugin

Registers nvidia.com/gpu and MIG device types with the kubelet so pods can request them

Status Updater

Watches pod GPU allocations and reports utilization metrics to Prometheus

nvidia-smi Injection

Injects a fake nvidia-smi binary into GPU pods so they see simulated GPU info

Nodes are included in the simulation when labeled with run.ai/simulated-gpu-node-pool=<pool-name>. The operator reads topology configuration from the topology ConfigMap to determine GPU product, count, and memory per node pool.

Use the GPU Config Plugin in the OpenShift Console (GPU Configuration > GPU Profiles) to switch between GPU profiles (A100, H100, H200, B200, GB200, L40S, T4) and configure MIG slice counts — no CLI required.

Exercise 1: Inspect the GPU topology

Acting as: admin
Log in to the OpenShift CLI:

oc login --insecure-skip-tls-verify $(oc whoami --show-server) -u admin -p %password%
  1. View the node labels that identify fake GPU nodes:

    oc get nodes -l nvidia.com/gpu.present=true --show-labels | grep -o 'nvidia[^ ]*'

    You should see a number of node labels including nvidia.com/gpu.present=true and run.ai/simulated-gpu-node-pool=<pool-name>.

  2. Check the GPU capacity reported by the node:

    oc get node -l nvidia.com/gpu.present=true \
      -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.metadata.labels.nvidia\.com/gpu\.product}{"\t"}gpu={.status.capacity.nvidia\.com/gpu}{"\n"}{end}'

    You should see the active GPU profile name and 8 full GPUs per node. MIG resources depend on the selected profile.

  3. Inspect the fake-gpu-operator pods:

    oc get pods -n gpu-operator

    You should see a number of pods including device-plugin-<hash>, topology-server-<hash>, nvidia-dcgm-exporter-<hash>, and gpu-node-labeler-<hash>.

  4. Inspect the node allocatable resources:

    oc get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.allocatable}{"\n"}{end}' | while read name alloc; do echo "=== $name ==="; echo "$alloc" | jq .; done

    You should see cpu, memory, pods and nvidia.com/gpu resource counts. If you see nvidia.com/mig-* resource counts, then you are running a MIG-capable profile.

The MIG resources may be present but show "0" as the count. This is expected from any prior MIG profiles that have been set and are no longer in use. They only reset when the Kubelet is restarted on the node.

Verify

✓ Nodes report nvidia.com/gpu capacity
✓ GPU product label matches the active profile
✓ Fake GPU operator pods are running

Exercise 2: Deploy a pod with fake GPUs

Acting as: user1
Log in to the OpenShift CLI:

oc login --insecure-skip-tls-verify $(oc whoami --show-server) -u user1 -p %password%
  1. Deploy a simple pod requesting one full GPU:

    helm template gpu-deploy oci://quay.io/eformat/gpu-test-workloads -n user-user1 \
      --set kind=Pod \
      --set name=gpu-test \
      --set replicas=1 \
      --set gpuCount=1 \
      --set gpuResourceType=nvidia.com/gpu \
      --set reserved=false \
      | oc -n user-user1 apply -f-
  2. Wait for the pod to start:

    oc -n user-user1 wait pod/gpu-test --for=condition=Ready --timeout=60s
  3. Run nvidia-smi inside the pod:

    oc -n user-user1 exec gpu-test -- nvidia-smi

    You should see simulated NVIDIA GPU information for the active profile — product name, memory, and utilization — even though no real GPU exists.

Acting as: admin
Log in to the OpenShift CLI:

oc login --insecure-skip-tls-verify $(oc whoami --show-server) -u admin -p %password%
  1. Check the GPU resource usage on the node:

    oc describe node -l nvidia.com/gpu.present=true | grep -A 15 "Allocated resources"

    You should see the GPU resource request and limits - usage - on each node.

Verify

✓ Pod started successfully with a GPU resource request
✓ nvidia-smi shows simulated H200 GPU info
✓ Node shows GPU allocation

Exercise 3: Test MIG partitions

Acting as: user1
Log in to the OpenShift CLI:

oc login --insecure-skip-tls-verify $(oc whoami --show-server) -u user1 -p %password%
  1. Deploy a pod requesting a MIG 1g.23gb partition:

    helm template gpu-deploy oci://quay.io/eformat/gpu-test-workloads -n user-user1 \
      --set kind=Pod \
      --set name=mig-test \
      --set replicas=1 \
      --set gpuCount=1 \
      --set gpuResourceType=nvidia.com/mig-1g.23gb \
      --set reserved=false \
      | oc -n user-user1 apply -f-
  2. Wait for the pod to be ready:

    oc -n user-user1 wait pod/mig-test --for=condition=Ready --timeout=60s
  3. and run nvidia-smi:

    oc -n user-user1 exec mig-test -- nvidia-smi

    Notice the nvidia-smi output shows the MIG partition size 23552MiB rather than the full GPU memory. You should also be able to see the MIG workload in the Bookings dashboard.

    MIG Workload in Bookings
    MIG resource types vary by GPU profile. If your cluster is running a non-MIG profile (L40S, T4), first switch to a MIG-capable profile using the GPU Config Plugin. See the Quickstart module for more details.
  4. Clean up both test pods:

    oc -n user-user1 delete pod gpu-test mig-test

Verify

✓ MIG pod started with nvidia.com/mig-1g.23gb resource
✓ nvidia-smi shows MIG partition info
✓ Both pods cleaned up

Module summary

What you accomplished:

  • Explored the fake-gpu-operator components and how they simulate GPU hardware

  • Inspected the GPU topology and verified the active GPU profile

  • Deployed pods requesting full GPUs and MIG partitions

  • Verified nvidia-smi emulation inside fake GPU pods

Key takeaways:

  • The fake-gpu-operator provides a complete GPU simulation layer — device plugin, metrics, and nvidia-smi

  • Pods request fake GPUs using the same resource names as real GPUs (nvidia.com/gpu, nvidia.com/mig-*)

  • MIG partitions allow multiple workloads to share a single GPU with isolated memory

  • The GPU Config Plugin lets you switch GPU profiles and MIG configurations from the console UI

  • This simulation approach lets you build and test GPU scheduling workflows without hardware cost

Next: Module 2 covers the GPU Booking App — a console plugin for reserving GPU time slots.