k8s-dra

Provides Kubernetes Dynamic Resource Allocation concepts, official docs, and Go API type definitions.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/peachest/skills --skill k8s-dra-peachest
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: k8s-dra
Source: https://github.com/peachest/skills/tree/main/misc/k8s-dra
Command: npx skills add https://github.com/peachest/skills --skill k8s-dra-peachest

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developing or managing Kubernetes Dynamic Resource Allocation (DRA) features requires accurate knowledge of DeviceClass, ResourceClaim, ResourceClaimTemplate, and ResourceSlice APIs, which are spread across official documentation and Go source code. This Skill consolidates DRA fundamentals, setup guides, and the complete resource.k8s.io/v1 Go type definitions in one place. ## Core Features & Use Cases - Concept Reference: Explains DRA terminology, user roles (device owner, cluster admin, workload operator), and the allocation workflow from ResourceSlice creation to Pod scheduling. - Cluster Setup Guide: Covers enabling DRA API groups, verifying configuration with kubectl, installing device drivers, and creating DeviceClasses with CEL selectors. - Go API Reference: Ships the full resource.k8s.io/v1 types.go covering ResourceSlice, ResourceClaim, Device, DeviceTaint, CapacityRequestPolicy, and feature-gated alpha fields. - Use Case: When writing a DRA driver or configuring GPU allocation for workloads, consult the reference to check exact field semantics, feature gates (e.g., DRAPartitionableDevices, DRAConsumableCapacity), and YAML manifest examples. ## Quick Start Explain how Kubernetes DRA ResourceClaims and ResourceSlices work and show me how to set up a DeviceClass for my cluster.

Frequently Asked Questions about k8s-dra

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does Kubernetes Dynamic Resource Allocation work?▼

DRA lets workloads request devices through ResourceClaims or ResourceClaimTemplates that reference a DeviceClass. Drivers publish ResourceSlices describing device pools, and the scheduler allocates matching devices and places Pods on nodes that can access them.

How do I set up DRA in a Kubernetes cluster?▼

Use a cluster running Kubernetes v1.34 or later, verify setup with kubectl get deviceclasses, then install DRA-compatible device drivers and create DeviceClasses. Alpha or beta API groups like resource.k8s.io/v1beta1 may need explicit enabling.

What is the difference between ResourceClaim and ResourceClaimTemplate?▼

A ResourceClaim is manually managed and lets multiple Pods share specific devices. A ResourceClaimTemplate lets Kubernetes auto-generate per-Pod ResourceClaims whose lifetime is bound to the corresponding Pod.

Does Kubernetes DRA support sharing one device across multiple claims?▼

Yes, via the alpha consumable capacity feature gated by DRAConsumableCapacity. Drivers set allowMultipleAllocations on devices in a ResourceSlice, and claims request specific capacity amounts that the scheduler tracks against total device capacity.

Why does kubectl get deviceclasses return a resource type error?▼

The error means the resource.k8s.io API group is disabled or DRA is misconfigured. Reconfigure and restart kube-apiserver, and verify the DynamicResourceAllocation feature gate is not turned off for the apiserver, scheduler, controller-manager, and kubelet.