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 CapacityandAllocatablelines mentioningnvidia.com/gpu: 2- A
RuntimeClassnamednvidia(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
nvidiaRuntimeClass - Requests one GPU via
resources.limits - Runs
nvidia-smiand 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:
- Your manifest passed admission (PSS=baseline + Kyverno's policies)
- The scheduler bound the Pod to a node with
nvidia.com/gpucapacity - The fake GPU runtime mounted the mock
nvidia-smiinto your container - 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-smioutput 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: ______