beginnerEnablement ~15 min
Validate GPU availability in Kubernetes
Confirm that GPUs are discovered, enabled, and schedulable on your cluster.
Scenario
You've just enabled GPUs on a cluster and need to prove they're allocatable before onboarding workloads.
Prerequisites
- ·kubectl access to a GPU cluster
- ·The GPU Operator (or device plugin) installed
0 / 3 tasks
- bash
kubectl get nodes -o custom-columns=NAME:.metadata.name,GPU:.status.allocatable.'nvidia\.com/gpu'Expected · A number > 0 for each GPU node.
- bash
kubectl -n gpu-operator get podsExpected · All pods Running / Completed.
- bash
kubectl run cuda-check --rm -it --restart=Never \ --image=nvidia/cuda:12.4.1-base-ubuntu22.04 \ --limits=nvidia.com/gpu=1 -- nvidia-smiExpected · nvidia-smi prints the GPU table and the pod exits 0.
Success criteria
- ✓Allocatable GPU count matches the hardware
- ✓The test pod ran nvidia-smi successfully
Hints
- ·If allocatable is 0, restart the device-plugin pod and check its logs.
- ·If the host can't see the GPU, it's a driver/kernel issue — not Kubernetes.