RBLN Kubernetes Device Plugin¶
RBLN SDK provides Kubernetes Device Plugin to support RBLN NPUs on Kubernetes cluster environment.
Step 1. Prepare NPU nodes¶
First, you need to prepare Kubernetes nodes equipped with RBLN NPUs and install the RBLN Driver. Typically, the stable version of the RBLN Driver is already installed on the cloud server you are currently using. If you can see the RBLN NPUs by executing the command rbln-smi, a command-line interface (CLI) utility which is already included in the RBLN Driver package, then you can skip the installation of the RBLN Driver. For more information about the installation, please refer to the Installation Guide.
CDI Configuration (Required)¶
The device plugin requires CDI to be enabled in the container runtime. You can configure containerd manually (and restart it), or let the Container Toolkit handle CDI setup.
containerd v1.7.x (/etc/containerd/config.toml)
containerd v2.x.x (/etc/containerd/config.toml)
When CDI is enabled, the device plugin adds a CDI annotation that references rebellions.ai/npu=all. This allows required libraries and tools (such as rbln-smi) to be automatically mounted when a workload requests the NPU resource (for example, rebellions.ai/npu).
Step 2. Install Device Plugin¶
The device plugin is recommended to be installed using the NPU Operator. However, if a standalone installation is required, it can be installed using the following command.
You can see the DaemonSet rbln-device-plugin under kube-system namespace, and Pods created from the Daemonset as below:
You can also check the RBLN NPU resources (rebellions.ai/npu) with the kubectl describe command as below:
Step 3. Create a Pod with NPUs¶
To create a Pod with NPU resources, you should add spec.containers[].resources.limits in your Pod spec as below:
You can create a Pod with the Pod spec using kubectl create command:
A single rebellions.ai/npu resource has been assigned to the Pod:
The device plugin automatically mounts the rbln-smi from the host machine to the Pod container. You can check it on the container as below:
Device Health Isolation¶
The device plugin checks the state of each NPU through the kernel driver on every device-discovery cycle and reports Healthy/Unhealthy to the kubelet. A device on which workloads cannot run is automatically excluded from scheduling, and it automatically returns to a schedulable state once the driver reports READY again.
NPU Allocation Tracing¶
The device plugin instruments the NPU allocation path with OpenTelemetry traces. For each allocation request, the span records which devices and Rebellions Scalable Design (RSD) group were handed to the container, so an OpenTelemetry Protocol (OTLP) backend can trace the per-node NPU allocation history.
Tracing is disabled by default and can be enabled by specifying an OTLP gRPC endpoint through the following Helm value.
Tracing is a supplementary observability feature, so the plugin continues to run without tracing even when the endpoint format is invalid or the OTLP exporter fails to initialize, and NPU scheduling on the node is unaffected.
An Allocate span is created per allocation request and an allocateContainer span per container, with the following attributes. When an allocation fails, the error is recorded on the span.
| Attribute | Description |
|---|---|
rbln.resource_name |
Resource name the allocation was requested for (e.g., rebellions.ai/npu) |
rbln.device.ids |
List of NPU device IDs allocated to the container |
rbln.device.count |
Number of allocated devices |
rbln.device.bus_ids |
List of PCI bus IDs of the allocated devices |
rbln.rsd.host_path |
Host path of the RSD group used for the allocation |
Every span carries the resource attributes service.name=rbln-device-plugin and service.version. In addition, when the NODE_NAME environment variable is set (the Helm DaemonSet always injects spec.nodeName), a k8s.node.name attribute is added so spans can be distinguished per node.
Logging¶
The plugin writes structured logs to stdout. Configure the log level and output format with the following environment variables:
| Variable | Description | Default |
|---|---|---|
RBLN_DEVICE_PLUGIN_LOG_LEVEL |
Verbosity: error, warning (or warn), info, debug. |
info |
RBLN_DEVICE_PLUGIN_LOG_FORMAT |
Output format: json or text. |
json |
An invalid value falls back to the default and logs a warning rather than failing startup. Records for unhealthy devices are logged at warn.
The plugin emits no info logs while the node state is unchanged. To verify that the scan loop is running, set the level to debug and look for the Reconciled device inventory record emitted on each scan.
When deployed by the RBLN NPU Operator, configure these settings with the chart's devicePlugin.logging values. See Component Logging.