Installation

Compatibility, runtime setup, security, uninstall, and migration from install.yaml.

The Quickstart walks through an install with a verification step after each stage, ending with a pod running on exclusive CPUs. This page is the reference: compatibility, runtime setup, security, uninstall, and migration.

Compatibility

Kubernetes requirements:

VersionStatus
1.33 or olderNot supported.
1.34–1.35Supported. Grouped mode (default) requires DRAConsumableCapacity enabled.
1.36Supported.
1.37Recommended. DRANodeAllocatableResources should be enabled for best experience.

Recommended Kubernetes setup

  • prefer uniform environments with no version skew between the control plane and the kubelet
  • cluster (Kubernetes’) feature gate enablement state for non-GA features should be reflected in the driver configuration. The driver cannot autodetect these, so this is a cluster admin responsibility.

Other requirements:

RequirementMinimum
Kernel cgroup versionCgroup v2. The driver does not support cgroup v1.
Container runtimecontainerd 2.0 or CRI-O 1.30 (NRI and CDI enabled by default)
Kubelet configurationCPUManager disabled: cpuManagerPolicy: none — see Configuration

Optional features need additional cluster feature gates. All the driver options which depends on the availability of a Kubernetes feature controlled by a Feature Gate require a double opt-in mechanism. First, the driver must be made aware of Kubernetes feature gate status (see above). Then, driver features can be enabled or disabled.

FeatureKubernetes feature gate
PCIe root attributesDRAListTypeAttributes
NodeAllocatable resources mappingDRANodeAllocatableResources

The driver is Linux-only and needs node-level privileges (host networking, and NRI socket, CDI directory, and kubelet plugin directory access) — see Security considerations.

The deployment must preserve the singleton ownership invariant.

Installing with Helm

If needed, create a kind cluster. We have one in the repo, if needed, that can be deployed as follows:

make kind-cluster

The recommended way to install the driver is via the provided Helm chart:

helm install dra-driver-cpu oci://registry.k8s.io/dra-driver-cpu/charts/dra-driver-cpu -n kube-system

See the Helm chart README for the full list of configuration options.

Besides the driver DaemonSet, the chart installs the cluster-scoped dra.cpu DeviceClass that workload claims reference — verify it with kubectl get deviceclass. The DeviceClass name is fixed, so a cluster that runs several releases of the chart (for example one per node class with a different reservedCPUs or kubeletRootDir) keeps deviceClass.create enabled in only one of them. Give each release its own nodeSelector or affinity, since the default selects every node and a node must run exactly one driver. Do not reuse fullnameOverride across releases: it replaces the release name in the ClusterRole and ClusterRoleBinding names. Uninstall the release that owns the DeviceClass last: removing it deletes the DeviceClass, and claims on the other releases’ nodes stop allocating until it exists again.

For environments with incomplete or synthetic sysfs topology, e.g. Docker Desktop for macOS see the sysfs overlay example. It demonstrates how to supply an overlay through driverConfig.sysfsOverlay, volume mounts, and volumes.

Container runtime setup

The driver relies on NRI (Node Resource Interface) to pin containers to their allocated CPUs, and on CDI (Container Device Interface) to inject the allocated cpuset into the container environment.

Minimum Runtime Requirements

Both NRI and CDI are enabled by default in modern container runtimes:

RuntimeNRI enabled by defaultCDI enabled by default
containerd2.0+2.0+
CRI-O1.30+always

Both runtimes also ship with the following CDI spec directories configured by default:

cdi_spec_dirs = ["/etc/cdi", "/var/run/cdi"]

No manual runtime configuration is needed if you are running one of the versions above or newer.

Manual Configuration for Older Runtimes

If you are running an older version of containerd (pre-2.0), you need to manually enable CDI and NRI in the containerd configuration (typically /etc/containerd/config.toml) and restart containerd.

Enable CDI:

[plugins."io.containerd.grpc.v1.cri"]
  enable_cdi = true
  cdi_spec_dirs = ["/etc/cdi", "/var/run/cdi"]

Enable NRI:

[plugins."io.containerd.nri.v1.nri"]
  disable = false
  disable_connections = false
  plugin_config_path = "/etc/nri/conf.d"
  plugin_path = "/opt/nri/plugins"
  plugin_registration_timeout = "5s"
  plugin_request_timeout = "5s"
  socket_path = "/var/run/nri/nri.sock"

After editing the config, restart containerd:

systemctl restart containerd

Security considerations

The driver needs node-level privileges: hostNetwork: true, and hostPath mounts for the NRI socket (/var/run/nri), the CDI spec directory (/var/run/cdi), and the kubelet plugin directories.

Upgrading (generic instructions)

Upgrade with Helm:

helm upgrade dra-driver-cpu oci://registry.k8s.io/dra-driver-cpu/charts/dra-driver-cpu -n kube-system

Uninstalling

helm uninstall dra-driver-cpu -n kube-system

Pods that are running keep their current cpusets, but nothing manages pinning or the shared pool anymore; delete or reschedule claim-bearing pods afterwards.

Installation via rendered manifest (deprecated)

Deprecated: Manifest-based installation is deprecated in favor of the Helm chart and will be removed in a future release. New users should use the Helm-based installation above.

make manifests
kubectl apply -f dist/helm-manifest.yaml