Run an NPU Pod¶
Request one NPU and verify that it is visible inside a container.
Use the Device Plugin configuration. If the Operator is not installed, follow Installing the NPU Operator.
Available NPU count
To check how many NPUs remain available on a node, run kubectl describe node <NODE_NAME> and compare Allocatable with Allocated resources. Allocatable includes NPUs that are already allocated.
1. Create the Pod¶
Create the npu-tutorial namespace and a Pod.
The first line of the output depends on whether the namespace already exists.
Wait for the new Pod to become Ready.
$ kubectl wait -n npu-tutorial --for=condition=Ready pod/first-npu --timeout=180s
pod/first-npu condition met
2. Verify the device¶
Check the assigned node and the requested NPU count.
$ kubectl get pod -n npu-tutorial first-npu \
-o 'custom-columns=NAME:.metadata.name,NODE:.spec.nodeName,NPUS:.spec.containers[0].resources.limits.rebellions\.ai/npu'
NAME NODE NPUS
first-npu node-rebel100 1
$ kubectl exec -n npu-tutorial first-npu -- rbln-smi -L
NPU 0 : RBLN-CR13 (UUID: NPU-34428712-d887-840b-a7b9-1c9e05807fc3)
$ kubectl get pod -n npu-tutorial first-npu \
-o 'custom-columns=NAME:.metadata.name,NODE:.spec.nodeName,NPUS:.spec.containers[0].resources.limits.rebellions\.ai/npu'
NAME NODE NPUS
first-npu node-atom 1
$ kubectl exec -n npu-tutorial first-npu -- rbln-smi -L
NPU 0 : RBLN-CA25 (UUID: NPU-c5ba8327-5b18-847e-953e-4ca4b4daeb44)
The check passes when the container lists the one NPU requested by the Pod.
Pod creation fails
- If the Pod stays
Pending, check Events withkubectl describe pod -n npu-tutorial first-npu.Insufficient rebellions.ai/npumeans no eligible node has enough available NPUs. - If
rbln-smiis missing or shows no device, check the Container Toolkit and Device Plugin Pods on the assigned node. See Operator observability.
Clean up¶
Deleting the Pod makes the NPU available to other Pods.