hands-on labKubernetes in your browser

Welcome to NCA-AIIO Labs: Schedule Your First GPU Pod

Smoke-test your NCA-AIIO lab environment: inspect your isolated Kubernetes cluster, schedule a Pod that requests an NVIDIA GPU, and observe realistic nvidia-smi output.

time
5 min
checked step
1
level
Beginner
setup
None

$29.99a month with Pro

Pro opens this lab and every other one. Cancel any time.

The job

You've just been given access to a fresh Kubernetes cluster with NVIDIA GPU support. Your job: verify the cluster works, then schedule a single Pod that requests one GPU and inspect what nvidia-smi reports. This is the same shape of task you'll do dozens of times during NCA-AIIO prep, author manifests, apply, observe.

One step, checked when you finish it

A check runs your work at the end of every step. Hints and the full solution are there if you get stuck.

  1. 1

    Inspect your cluster, schedule a GPU pod

    When you started this lab, the platform provisioned a fresh virtual Kubernetes cluster (vCluster) just for you.

    read this step below ↓

Step 1 as it appears in the lab

The lab’s own text. The hint and the solution stay inside the lab.

Step 1: Inspect your cluster, schedule a GPU pod

Your isolated Kubernetes cluster

When you started this lab, the platform provisioned a fresh virtual Kubernetes cluster (vCluster) just for you. You have full cluster-admin inside it — you can create namespaces, ClusterRoles, ResourceQuotas, the works. The cluster sees one Node (the host machine) advertising fake NVIDIA GPUs.

Step 1a — kick the tires

Run these in your terminal to get oriented:

kubectl get nodes -o wide
kubectl describe node | grep -A2 'Capacity:\|nvidia.com/gpu'
kubectl get runtimeclass

You should see:

  • One node with status Ready
  • Capacity and Allocatable lines mentioning nvidia.com/gpu: 2
  • A RuntimeClass named nvidia (handler: runc — the mock GPU runtime)

Step 1b — schedule a GPU Pod

Now open the file gpu-test.yaml. It's a Pod manifest with a few # TODO: markers. Fill them in so the Pod:

  • Uses the nvidia RuntimeClass
  • Requests one GPU via resources.limits
  • Runs nvidia-smi and exits

Then apply it and inspect the output:

kubectl apply -f gpu-test.yaml
kubectl wait --for=condition=Ready pod/gpu-test --timeout=30s || true
sleep 5
kubectl logs gpu-test

When nvidia-smi reports a Tesla K80 with realistic-looking utilization numbers, you've verified the scheduling chain end-to-end:

  1. Your manifest passed admission (PSS=baseline + Kyverno's policies)
  2. The scheduler bound the Pod to a node with nvidia.com/gpu capacity
  3. The fake GPU runtime mounted the mock nvidia-smi into your container
  4. The binary contacted the topology server to render plausible data

That's the same chain a real NVIDIA GPU Operator deployment uses — only the bottom layer (real driver vs mock) differs.

NCA-AIIO exam note: You should be able to read a nvidia-smi output and extract: driver version, CUDA version, GPU memory total/used, GPU-Util, and identify when a Process is consuming the GPU vs idle. This lab gives you a baseline shape to refer to.

gpu-test.yaml, the file you edit16 lines
apiVersion: v1
kind: Pod
metadata:
  name: gpu-test
spec:
  # TODO: opt into the nvidia RuntimeClass
  runtimeClassName: ______
  restartPolicy: Never
  containers:
    - name: gpu
      image: docker.io/library/ubuntu:22.04
      command: ["sh", "-c", "sleep 3; nvidia-smi; exit 0"]
      resources:
        limits:
          # TODO: request one fake GPU
          nvidia.com/gpu: ______

what you get

  • A Kubernetes cluster and terminal in your browser
  • A check at the end of every step
  • Hints and the full solution
  • Nothing to install or configure

before you start

  • Basic kubectl familiarity (kubectl get, kubectl apply)
  • Read a Pod YAML manifest

Exam domains covered

AI Infrastructure & OperationsGPU Acceleration & Distributed Training

Part of the GPU and Kubernetes track

Lab 1 of 20. GPU scheduling on your own Kubernetes cluster, the GPU Operator, CUDA kernels and profiling.

Questions about this lab

Is the GPU output real or simulated?

Simulated. The lab platform uses Run:AI's open-source fake-gpu-operator to advertise nvidia.com/gpu resources without consuming real GPU hardware, that's how we keep per-session cost near zero while letting you exercise the real Kubernetes scheduling, RBAC, ResourceQuota, and GPU Operator workflow. The nvidia-smi output is generated by a fake binary that returns realistic data (driver version, memory, utilization). For NCA-AIIO content this is the right trade-off: the cert tests your ability to author manifests, debug the GPU Operator chain, and reason about scheduling, none of which require actual CUDA execution.

Why do I need runtimeClassName: nvidia in the Pod spec?

RuntimeClass is the K8s API for selecting a non-default container runtime. nvidia is the convention for the NVIDIA Container Toolkit runtime, which mounts the GPU driver libraries and nvidia-smi into the container. Without runtimeClassName: nvidia, the Pod gets the default runtime (runc) and the container has no view of the GPU, even if the request says nvidia.com/gpu: 1. NCA-AIIO Domain 3 (Workloads) specifically tests RuntimeClass knowledge.

What does resources.limits.nvidia.com/gpu: 1 actually do?

It tells the scheduler: 'this Pod needs one device of type nvidia.com/gpu, please find a Node that has at least one available'. The Node advertises capacity via the device plugin (which is what fake-gpu-operator simulates). If you set it to a number larger than the Node has, the Pod stays Pending with 0/1 nodes available: insufficient nvidia.com/gpu. Your namespace's ResourceQuota also caps the total, you can't request more than the quota allows.

What you'll do in this NCA-AIIO welcome lab

Every NCA-AIIO scenario starts the same way, kubectl get nodes, confirm GPUs are advertised, schedule a workload with a nvidia.com/gpu: 1 resource request, watch the scheduler bind it. This 5-minute smoke-test gives you the muscle memory and proves your isolated lab environment is functioning. You'll write a minimal Pod manifest, apply it via kubectl, wait for it to run, and read the nvidia-smi output the GPU runtime emits. The cluster is real, your own per-session vCluster, and the GPU resource model is the same Kubernetes API contract you'll see in production NVIDIA infrastructure work.

The substance is small but foundational: runtimeClassName: nvidia to opt into the GPU runtime, resources.limits.nvidia.com/gpu: 1 to request one device, and a container image that has nvidia-smi available. You'll learn to read the nvidia-smi output for what an NCA-AIIO question expects you to extract, driver version, CUDA version, Memory-Usage, GPU-Util, the Processes table, and you'll see the K8s scheduler reject over-requests once you push past your namespace's ResourceQuota. Future labs build directly on top: ResourceQuota authoring, RBAC scoping, GPU Operator chain debugging, MIG profile selection.