Kubernetes Quickstart
New to Kubernetes? Start with the Kubernetes Beginner Guide, which explains each piece with a classroom analogy and hands-on examples.
Run DEEPX DX-M1 NPUs as native Kubernetes resources: request deepx.ai/dx-m1: 1
in a Pod spec and the scheduler places the Pod on an NPU node, with the device
node and runtime libraries injected automatically.
Architecture
host (per NPU node) k3s cluster
───────────────────── ─────────────────────────────────────────
dx-runtime/install.sh ──► driver (dxrt-driver-dkms) + firmware + dxrtd
containerd CDI enabled (enable_cdi=true, cdi_spec_dirs incl /etc/cdi)
Helm: dx-npu ──► NodeFeatureRule (PCI 1ff4 → deepx.ai/dx-m1.present)
└► device-plugin DaemonSet → advertises deepx.ai/dx-m1
├─ writes /etc/cdi/deepx.json (device node + libs + dxcli)
├─ writes NFD feature file → fw/driver version node labels
└─ serves deepx_npu_* Prometheus metrics on :9400
Pod requests deepx.ai/dx-m1: 1 → containerd injects /dev/dxrtN + runtime libs
Components (mirroring the proven NVIDIA stack layout):
| Component | Role |
|---|---|
| dx-k8s-device-plugin | Advertises deepx.ai/dx-m1, health checks, Pod allocation |
| CDI spec (generated by the plugin) | Injects /dev/dxrtN, runtime libs, and dxcli into containers |
| NFD integration | Node labels: presence, count, product, firmware/driver versions |
dx-npu Helm chart | One-command install/upgrade of all of the above |
Prerequisites
-
Cluster tools. Skip this step if you already have a Kubernetes cluster plus
kubectlandhelm.# k3s — a single-binary Kubernetes; installs kubectl toocurl -sfL https://get.k3s.io | sh -# use kubectl without sudomkdir -p ~/.kubesudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/configsudo chown "$USER" ~/.kube/config# k3s's kubectl reads /etc/rancher/k3s/k3s.yaml (root-only) unless KUBECONFIG is setecho 'export KUBECONFIG=~/.kube/config' >> ~/.bashrcexport KUBECONFIG=~/.kube/config# helmcurl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash# jq — only used by the check commands in these docssudo apt-get install -y jqkubectl get nodes # STATUS Readyhelm versionOn vanilla Kubernetes, install kubectl from the official guide and helm from helm.sh.
-
Each NPU node — host driver, firmware, and runtime:
cd dx-runtime && ./install.sh --runtime-onlydxcli -s # must list the NPU(s)# NPU pods run their own dxrtd; a host dxrtd on the same card makes them hangsudo systemctl disable --now dxrt.serviceThe device plugin allocates each card to one Pod, and that Pod runs its own
dxrtd. Keep the hostdxrt.servicestopped on NPU nodes — twodxrtdinstances on one card leave in-Pod inference hanging. This makes the node Kubernetes-only for the NPU: host-side apps that needdxrtdwill not run while the service is off.The CDI spec mounts the host
libdxrt.so.3andlibonnxruntime.so.1into every NPU Pod, so the node's DX-RT must be the same build as the DX-RT in the Pod image (dxcli --versionon the host and in the image). A mismatch fails withundefined symbolerrors. -
containerd CDI enabled. containerd 2.x turns CDI on by default (
enable_cdi = true, spec dirs/etc/cdiand/var/run/cdi), so there is nothing to do. Check the version:sudo k3s ctr version | grep -m1 Version # v2.x → doneOnly containerd 1.7 needs CDI switched on. On k3s, do not create
config.toml.tmplwith just the CDI lines — k3s uses the template instead of its generated config, so the rest of the containerd settings would disappear. Start from the generated file and append:cd /var/lib/rancher/k3s/agent/etc/containerdsudo cp config.toml config.toml.tmplsudo tee -a config.toml.tmpl <<'EOF'[plugins."io.containerd.grpc.v1.cri".cdi]enable_cdi = truecdi_spec_dirs = ["/etc/cdi", "/var/run/cdi"]EOFsudo systemctl restart k3sEither way, the smoke test below proves it: if
/dev/dxrt0shows up inside the pod, CDI works.
Install
helm install dx-npu oci://ghcr.io/deepx-ai/charts/dx-npu \
-n dx-system --create-namespace --set nfd.enabled=true
Leave nfd.enabled=false (default) if the cluster already runs
node-feature-discovery.
Verify the NPU is schedulable and labeled:
kubectl get node -o json | jq '.items[].status.allocatable' | grep deepx.ai/dx-m1
kubectl get node --show-labels | grep -o 'deepx.ai[^,]*'
# deepx.ai/dx-m1.present=true, .count, .product, .fw-version, .driver-version
Run a workload
Smoke test (thin image — everything arrives via CDI):
kubectl apply -f deploy/k8s/samples/test-pod.yaml
kubectl logs -f dx-m1-test
# shows /dev/dxrt0 and full `dxcli -s` device status from inside the Pod
Real inference with the suite runtime image. An init container fetches one
model into an emptyDir, then dxrun reports NPU time, latency, and FPS:
kubectl apply -f deploy/k8s/samples/inference-pod.yaml
kubectl wait --for=jsonpath='{.status.phase}'=Succeeded pod/dx-m1-inference --timeout=300s
kubectl logs dx-m1-inference -c inference
Any Pod becomes an NPU Pod with just a resource request:
resources:
limits:
deepx.ai/dx-m1: 1
Metrics
The device plugin serves Prometheus metrics on :9400 (headless Service
dx-npu-metrics): deepx_npu_up, deepx_npu_device_healthy, and per-core
deepx_npu_core_{temperature_celsius,voltage_millivolts,clock_mhz}. Set
metrics.serviceMonitor.enabled=true when prometheus-operator is present.
Troubleshooting
| Symptom | Cause / fix |
|---|---|
deepx.ai/dx-m1 missing from allocatable | Device plugin Pod not running — check kubectl get pods -n dx-system and that the node carries deepx.ai/dx-m1.present=true |
No deepx.ai/* node labels | NFD not installed — set nfd.enabled=true or install NFD; without NFD, label manually: kubectl label node <n> deepx.ai/dx-m1.present=true |
Pod scheduled but /dev/dxrt* missing | containerd CDI not enabled — apply the config.toml.tmpl change and restart k3s |
dxcli reports no devices on host | Driver/firmware not installed — rerun dx-runtime/install.sh, then cold-boot if device init fails |
| Device reported unhealthy | Card present in sysfs but absent from dxcli -s — usually needs a host power cycle |
Inference Pod stays Running, dxrun never exits | Host dxrt.service is running on the node — sudo systemctl disable --now dxrt.service (Prerequisites, step 1) |
dxrun: symbol lookup error: undefined symbol in a Pod | Node DX-RT and Pod image DX-RT differ — CDI mounts the host libdxrt.so.3; install the same DX-RT build on the node and in the image |
GLIBC_2.xx not found running dxcli in a pod | The Pod image's glibc is older than the host DX-RT that CDI injects — use ubuntu:24.04 or newer as the base (see the note below) |
CDI mounts the node's dxcli and libdxrt.so.3 into the Pod, so the Pod image needs at least the glibc those binaries were built against:
- Prebuilt
libdxrt-binpackage: glibc ≥ 2.27 - DX-RT built from source on the node: follows the node's glibc (e.g.
GLIBC_2.38on Ubuntu 24.04)
Check the actual requirement on the node with objdump -T /usr/local/bin/dxcli /usr/local/lib/libdxrt.so.3 | grep -o 'GLIBC_[0-9.]*' | sort -uV | tail -1.
Full chart values and details: deploy/k8s/README.md.