A Rust library for building Kubernetes Dynamic Resource Allocation (DRA) drivers.
This crate is under active development and not yet usable. Watch this repository for updates.
DRA went GA in Kubernetes 1.34. The Kubernetes project provides
k8s.io/dynamic-resource-allocation — a set of Go packages that handle
all the plumbing a DRA driver needs: kubelet plugin registration, ResourceSlice
synchronization, gRPC lifecycle, claim fetching, device metadata, rolling
updates, and API version negotiation.
No equivalent exists for Rust. kube-dra aims to be a drop-in replacement.
The workspace mirrors the Go module structure:
kube-dra/
client/ Negotiates API versions with the cluster
resourceslice/ Watches and reconciles ResourceSlice objects
kubeletplugin/ Kubelet plugin registration, gRPC servers, device preparation
A DRA driver depends on kubeletplugin, implements the DraPlugin
trait, and the library handles everything else.
- Device discovery and enumeration
- Checkpoint persistence across restarts
- CDI spec writing for device access (distinct from metadata CDI)
- Opaque config decoding (driver-specific types)
- Health check server
Apache 2.0 licensed. See LICENSE for details.