Skip to main content
Dynamic resource allocation (DRA) is a Kubernetes feature that lets workloads request specialized devices, such as GPUs and remote direct memory access (RDMA) network interfaces. Without DRA, a GPU resource request specifies only a quantity, such as nvidia.com/gpu: 1. Kubernetes schedules the Pod on a node with enough available GPUs. With DRA, a workload can request devices from a DeviceClass and specify requirements for their properties and configuration. Kubernetes selects suitable devices, schedules the Pod on a node that can access them and asks the device driver to prepare them for the container. Managed Service for Kubernetes supports DRA for two kinds of devices: This guide explains how to enable DRA on a node group and use it to allocate resources to a workload.
Allocating a GPU claim and a network interface to the same Pod does not guarantee that the devices share a PCI root or the same non-uniform memory access (NUMA) node. If the workload requires that placement, validate it in the application.

Prerequisites

  1. Create a Managed Kubernetes cluster that runs Kubernetes 1.34 or later, or upgrade an existing cluster. Kubernetes 1.34 is the first version in which the DRA API, resource.k8s.io/v1, is stable. For the versions available in Managed Kubernetes, see Kubernetes versions.
  2. Install kubectl and connect to the cluster.
  3. Install jq.
  4. Install Helm.

How to enable DRA on a node group

Enable DRA in the GPU settings of the node group. The legacy NVIDIA device plug-in and the NVIDIA DRA driver must not manage the same GPUs. This setting prepares the nodes for GPU DRA and disables the legacy plug-in on that group. When you use a preinstalled NVIDIA driver, select a driver preset. Otherwise, install the NVIDIA GPU Operator and, for InfiniBand, the NVIDIA Network Operator. When installing GPU Operator, set devicePlugin.enabled=false so the Operator does not start the legacy plug-in. For the commands and installation order, see How to install the drivers and components on existing node groups. Use one of the following:
  • To create a node group, add the DRA settings in the create request:
    Add --template-gpu-settings-dra=true to the create command:
    Set <driver_preset> when you use a preinstalled driver. Otherwise, omit --template-gpu-settings-drivers-preset.
  • To enable DRA on an existing node group, add the same settings when you update the node group.
    Enabling or disabling DRA on an existing node group recreates its nodes according to the group’s deployment strategy.
After enabling DRA, proceed with one of the following:

Allocating a GPU

Managed Kubernetes does not install the NVIDIA DRA driver. Install and maintain the driver yourself.

Install the NVIDIA DRA driver

  1. Add the NVIDIA chart repository:
  2. Install the supported NVIDIA DRA driver version:
    For other chart values required by your node image, see the NVIDIA DRA driver for GPUs documentation.

Check the NVIDIA DRA driver

  1. Check that the driver Pods are ready:
    The output lists one controller Pod and one kubelet plugin Pod for each GPU node. All Pods are Running, with all containers ready:
  2. Check that the driver has created the GPU DeviceClass:
    The expected output is:
  3. Check that the driver has published the GPU inventory:
    The output lists every target GPU node with its GPUs, for example:

Request a GPU

  1. Save the following manifest as gpu-workload.yaml. Replace <tested_cuda_image> with a container image that includes nvidia-smi. The Pod command runs nvidia-smi to confirm the GPU. For example, nvidia/cuda:13.1.1-runtime-ubuntu24.04.
  2. Create the ResourceClaimTemplate and Pod:
  3. Wait until the Pod is running:
  4. Check that the GPU is visible in the container:
    The output lists one allocated GPU.

Allocating an RDMA or InfiniBand interface

How managed DRANet works

When you enable DRA on a node group in a GPU cluster, Managed Kubernetes installs and maintains the DRANet driver for you. You don’t need to install it yourself. Managed Kubernetes:
  • Runs the dranet DaemonSet in the kube-system namespace on nodes labeled nebius.com/dranet-rdma-capable=true.
  • Discovers the RDMA-capable network interfaces on those nodes.
  • Publishes the discovered interfaces to Kubernetes as ResourceSlices.
  • Provides DeviceClasses that workloads can use to request an RDMA or InfiniBand interface.

Check managed DRANet

  1. Check that the dranet DaemonSet is running:
    The expected output is:
    The DaemonSet is in the kube-system namespace. The ready count matches the number of eligible nodes, and the node selector is nebius.com/dranet-rdma-capable=true.
  2. Check that Managed Kubernetes has created the network DeviceClasses:
    The expected output is:
    The DeviceClasses select the following interfaces:
  3. Check that DRANet has published the network-device inventory:
    Each device lists its name and attributes. Confirm that the interface is RDMA-capable.
Don’t request both rdma.networking.nebius.ai and ib.networking.nebius.ai when the workload needs only one network device. Kubernetes treats them as independent device requests and allocates two separate devices.
Choose one DeviceClass based on the workload requirements:
  • Use ib.networking.nebius.ai when the workload specifically requires an InfiniBand interface. InfiniBand interfaces are RDMA-capable, so you don’t need an additional request for rdma.networking.nebius.ai.
  • Use rdma.networking.nebius.ai when the workload can use any RDMA-capable interface, including either InfiniBand or Ethernet-based RDMA.
Request both only when the workload requires two separate network devices.

Request an InfiniBand interface

The following example requests one interface from the ib.networking.nebius.ai DeviceClass. To request any RDMA-capable interface instead, use rdma.networking.nebius.ai.
  1. Save the following manifest as ib-workload.yaml. Replace <container_image_with_rdma_tools> with a container image that includes the RDMA user-space tools you use to test the allocated interface.
    count specifies the number of interfaces to allocate. It does not change the bandwidth of an individual interface. If you omit count, the default is 1.
  2. Create the ResourceClaimTemplate and the Pod:
  3. Wait until the Pod is running:

Verify the network allocation

  1. Get the generated claim name from the Pod:
  2. Inspect the generated ResourceClaim. Replace <claim_name> with the name from the previous command:
    In status.allocation.devices.results, the allocation contains the DRANet driver, device pool and allocated device:
  3. Check that the allocated interface is visible inside the container:
    In addition to the default interfaces, the output contains the allocated interface:
  4. Check that the RDMA devices are visible to the container:
    The output contains the associated RDMA device, for example:
A ResourceClaim allocation and an interface visible in the container confirm that Kubernetes has passed the interface to the Pod. They don’t show that RDMA traffic works. Test connectivity and throughput with the application’s network test.

See also


InfiniBand and InfiniBand Trade Association are registered trademarks of the InfiniBand Trade Association.