Set Up DRA in a Cluster [page]deterministic
This page shows you how to configure _dynamic resource allocation (DRA)_ in a Kubernetes cluster by enabling API groups and configuring classes of devices. These instructions are for cluster administrators.
## About DRA {#about-dra}
[definition:dra]
Ensure that you're familiar with how DRA works and with DRA terminology like [DeviceClasses](#gloss:deviceclass), [ResourceClaims](#gloss:resourceclaim), and [ResourceClaimTemplates](#gloss:resourceclaimtemplate). For details, see [Dynamic Resource Allocation (DRA)](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/).
##
* Directly or indirectly attach devices to your cluster. To avoid potential issues with drivers, wait until you set up the DRA feature for your cluster before you install drivers.
## Optional: enable additional DRA API groups {#enable-dra}
DRA overall is a stable feature in Kubernetes; however, aspects of it may still be alpha or beta. If you want to use any aspect of DRA that is not yet stable, and the associated feature relies on a dedicated API kind, then you must enable the associated alpha or beta API groups.
Some older DRA drivers or workloads might still need the v1beta1 API from Kubernetes 1.30 or v1beta2 from Kubernetes 1.32. If and only if support for those is desired, then enable the following [API groups](#gloss:api-group):
* `resource.k8s.io/v1beta1` * `resource.k8s.io/v1beta2`
Alpha features with separate API types need:
* `resource.k8s.io/v1alpha3`
For more information, see [Enabling or disabling API groups](/docs/reference/using-api/#enabling-or-disabling).
## Verify that DRA is enabled {#verify}
To verify that the cluster is configured correctly, try to list DeviceClasses:
```shell kubectl get deviceclasses ``` If the component configuration was correct, the output is similar to the following:
``` No resources found ```
If DRA isn't correctly configured, the output of the preceding command is similar to the following: ``` error: the server doesn't have a resource type "deviceclasses" ```
For example, this can occur when the resource.k8s.io API group was disabled. A similar check is applicable to alpha or beta quality top-level types.
Try the following troubleshooting steps:
1. Reconfigure and restart the `kube-apiserver` component.
1. If the complete `.spec.resourceClaims` field gets removed from Pods, or if Pods get scheduled without considering the ResourceClaims, then verify that the `DynamicResourceAllocation` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is not turned off for kube-apiserver, kube-controller-manager, kube-scheduler or the kubelet.
## Install device drivers {#install-drivers}
After you enable DRA for your cluster, you can install the drivers for your attached devices. For instructions, check the documentation of your device owner or the project that maintains the device drivers. The drivers that you install must be compatible with DRA.
To verify that your installed drivers are working as expected, list ResourceSlices in your cluster:
```shell kubectl get resourceslices ``` The output is similar to the following:
``` NAME NODE DRIVER POOL AGE 00000-driver.example.com-cluster-1-node-1-abcde cluster-1-node-1 driver.example.com cluster-1-device-pool-1-r1gc 7s 00000-driver.example.com-cluster-1-node-2-fghij cluster-1-node-2 driver.example.com cluster-1-device-pool-2-446z 8s ```
Try the following troubleshooting steps:
1. Check the health of the DRA driver and look for error messages about publishing ResourceSlices in its log output. The vendor of the driver may have further instructions about installation and troubleshooting.
## Create DeviceClasses {#create-deviceclasses}
You can define categories of devices that your application operators can claim in workloads by creating [Device …(trimmed)