From 5f55d099c5ee1ad566a4f8818383903565d9d8cc Mon Sep 17 00:00:00 2001 From: Mike McKiernan Date: Fri, 6 Nov 2026 17:08:28 +0000 Subject: [PATCH 1/2] docs: Refactor the DRA Driver page Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Signed-off-by: Mike McKiernan --- gpu-operator/dra-intro-install.rst | 164 ++++++++++++++++------------- gpu-operator/getting-started.rst | 21 ++-- 2 files changed, 107 insertions(+), 78 deletions(-) diff --git a/gpu-operator/dra-intro-install.rst b/gpu-operator/dra-intro-install.rst index 69411bd65..ef8694843 100644 --- a/gpu-operator/dra-intro-install.rst +++ b/gpu-operator/dra-intro-install.rst @@ -21,7 +21,11 @@ DRA Driver for NVIDIA GPUs ########################## Dynamic Resource Allocation (DRA) is a Kubernetes API for flexibly requesting, configuring, and sharing specialized devices such as GPUs. -This page describes how to use the GPU Operator to install and manage DRA Driver for NVIDIA GPUs v${dra_version}. +For example, workloads can request GPUs by attributes, such as model, memory, and compute capability. +Workloads use resource claims to request GPUs and share allocated devices across containers or pods. + +By default, the Operator does not install the DRA Driver. +Refer to :ref:`Install the DRA Driver ` for the commands. Before using the DRA Driver for NVIDIA GPUs, familiarize yourself with the following documentation: @@ -32,8 +36,8 @@ Before using the DRA Driver for NVIDIA GPUs, familiarize yourself with the follo Comparison: DRA and Device Plugin ********************************* -GPU Operator supports the DRA Driver as a more recent alternative to the NVIDIA Device Plugin for Kubernetes. -However, some features of the DRA driver have alpha support status. +The GPU Operator supports the DRA Driver as a more recent alternative to the NVIDIA Kubernetes Device Plugin. +However, some features of the DRA Driver have alpha support status. A cluster can have either a ``GPUCluster`` resource for DRA or a ``ClusterPolicy`` resource for the Device Plugin, but not both. @@ -79,11 +83,28 @@ The following table compares the GPU allocation capabilities of the two mechanis gRPC health probes report kubelet plugin availability only. - Reports unhealthy devices through the Kubernetes Device Plugin API. - * - Device Injection and Managed Components + * - Device Injection - Requires a Container Device Interface (CDI)-compatible runtime. - ``GPUCluster`` manages DRA, ComputeDomains, NVIDIA Data Center GPU Manager (DCGM), DCGM Exporter, and the DRA validator. - Supports multiple device injection strategies. - ``ClusterPolicy`` manages NVIDIA Container Toolkit, GPU Feature Discovery, MIG Manager, the sandbox device plugin, Kata Containers, KubeVirt, and NVIDIA vGPU Manager. + + * - Components Managed by the Operator + - With ``GPUCluster``, the Operator manages: + + * DRA Driver kubelet plugin + * ComputeDomain controller and kubelet plugin, when enabled + * DRA validator + * DCGM Exporter, when enabled + * Standalone NVIDIA Data Center GPU Manager (DCGM), when enabled + + - With ``ClusterPolicy``, the Operator manages: + + * NVIDIA Container Toolkit + * GPU Feature Discovery + * MIG Manager + * Sandbox device plugin + * Kata Containers + * KubeVirt + * NVIDIA vGPU Manager * - Kubernetes Scheduling - Allocation through a ``ResourceClaim``, which can be referenced by multiple containers or Pods. @@ -92,7 +113,7 @@ The following table compares the GPU allocation capabilities of the two mechanis DRA Driver Feature Maturity =========================== -The following table groups the DRA driver capabilities by maturity: +The following table groups the DRA Driver capabilities by maturity: .. list-table:: DRA Driver Capability Maturity :header-rows: 1 @@ -123,14 +144,14 @@ The following table groups the DRA driver capabilities by maturity: - Disabled - ``draDriver.featureGates`` -Refer to the `DRA driver v${dra_version} overview `__ +Refer to the `DRA Driver v${dra_version} overview `__ and `feature-gate definitions `__ for the authoritative support status, maturity, and default values. DRA Driver Limitations ====================== -Consider the following limitations before selecting DRA driver v${dra_version}: +Consider the following limitations before selecting DRA Driver v${dra_version}: * ``NVMLDeviceHealthCheck`` is alpha and disabled by default. The gRPC health probe reports kubelet plugin availability, and DCGM provides telemetry. @@ -139,7 +160,7 @@ Consider the following limitations before selecting DRA driver v${dra_version}: When enabled, the feature provides scheduler-accounted capacity sharing among independent ``ResourceClaim`` objects for full GPUs and MIG devices. Kubernetes v1.34 and v1.35 require enabling the ``DRAConsumableCapacity`` feature gate. Kubernetes v1.36 and later enable the feature by default. - You must also set the ``CONSUMABLE_SHARES`` environment variable for the DRA GPU kubelet plugin to ``memory``, ``unlimited``, or a positive integer. + You must also set the ``CONSUMABLE_SHARES`` environment variable for the DRA Driver kubelet plugin to ``memory``, ``unlimited``, or a positive integer. Set the environment variable through ``draDriver.gpus.kubeletPlugin.env``. MPS cannot be used when consumable capacity is configured through ``ConsumableShares``. * Alpha feature gates have compatibility constraints. @@ -149,39 +170,14 @@ Consider the following limitations before selecting DRA driver v${dra_version}: Injecting DRA-allocated devices requires a preconfigured CDI-compatible container runtime. The managed ``gpu.nvidia.com`` ``DeviceClass`` does not set ``spec.extendedResourceName`` to ``nvidia.com/gpu``. -******** -Overview -******** - -The GPU Operator manages DRA components through the ``GPUCluster`` custom resource. -``GPUCluster`` is a cluster-scoped singleton and its name must be ``gpu-cluster``. -The Helm chart creates this resource when you set ``gpuCluster.deployCR=true``. - -A cluster can have either a ``GPUCluster`` or a ``ClusterPolicy`` resource, but not both. -The GPU Operator uses ``ClusterPolicy`` to manage components for Device Plugin-based allocation -and ``GPUCluster`` to manage components for DRA-based allocation. - -For ``GPUCluster``, the GPU Operator manages the following components: - -* The DRA driver GPU capability for ``gpu.nvidia.com``, ``mig.nvidia.com``, and ``vfio.gpu.nvidia.com`` devices. - This capability is always enabled, although VFIO passthrough is unusable without the Alpha ``PassthroughSupport`` feature gate which is off by default. -* The ComputeDomain controller and kubelet plugin for Multi-Node NVLink (MNNVL). - ComputeDomain support is enabled by default and can be disabled. -* A DRA validator that allocates a GPU by using a ``ResourceClaim`` and verifies that the device is usable. -* DCGM Exporter, which is enabled by default. -* Standalone DCGM, which is disabled by default. - -The ``GPUCluster`` resource does not manage the NVIDIA GPU driver. -Use an ``NVIDIADriver`` resource to install a containerized driver or use a driver that is pre-installed on the host. -The Operator automatically assigns the ``nvidia.com/gpu.deploy.*`` labels that control operand placement. - -GPUCluster Limitations -====================== +************************ +Installation Limitations +************************ * Use this workflow for a new installation. - An in-place migration from a standalone DRA driver Helm release or from ``ClusterPolicy`` to ``GPUCluster`` is not supported. + An in-place migration from a standalone DRA Driver Helm release or from ``ClusterPolicy`` to ``GPUCluster`` is not supported. * ``GPUCluster`` does not expose the controller affinity, priority class, toleration, - and kubelet-plugin node selector overrides that were used by the previous standalone DRA driver procedure for Google Kubernetes Engine (GKE). + and kubelet-plugin node selector overrides that were used by the previous standalone DRA Driver procedure for Google Kubernetes Engine (GKE). This page does not provide a managed DRA installation procedure for GKE. ************* @@ -192,7 +188,8 @@ In addition to ensuring that your GPUs and cluster align with the :ref:`GPU Oper * Kubernetes v1.34.2 or later with a ``resource.k8s.io`` ``DeviceClass`` API available. * NVIDIA GPU driver version 580 or later. -* An underlying container runtime that supports CDI and is configured to use CDI for injecting DRA-allocated devices. + The Operator can install the driver or you can use a pre-installed driver. +* A container runtime that supports CDI and is configured to use CDI for injecting DRA-allocated devices. * No ``ClusterPolicy`` resource exists in the cluster. .. code-block:: console @@ -203,7 +200,7 @@ In addition to ensuring that your GPUs and cluster align with the :ref:`GPU Oper .. note:: - To use an extended-resource request with the DRA driver, enable the + To use an extended-resource request with the DRA Driver, enable the `DRAExtendedResource `_ feature gate. This feature gate is enabled by default in Kubernetes v1.36.0 and later. Request ``deviceclass.resource.kubernetes.io/gpu.nvidia.com`` to use the managed ``gpu.nvidia.com`` ``DeviceClass``. @@ -216,20 +213,39 @@ For ComputeDomain support, verify the following additional prerequisites: * NVIDIA Grace Blackwell GPUs with Multi-Node NVLink available on your cluster, such as NVIDIA HGX GB200 NVL72 or NVIDIA HGX GB300 NVL72. Refer to the `NVIDIA Multi-Node NVLink Systems documentation `_ for more information. -* If you use a pre-installed GPU driver, install the corresponding ``nvidia-imex-*`` packages through the Linux distribution package manager. -* If you use a pre-installed GPU driver, disable and mask the IMEX systemd service on every GPU node before installing the GPU Operator: +* If you use a pre-installed NVIDIA GPU driver: - .. code-block:: console + * Install the corresponding ``nvidia-imex-*`` packages through the Linux distribution package manager. + * Disable and mask the IMEX systemd service on every GPU node before installing the GPU Operator: + + .. code-block:: console - $ systemctl disable --now nvidia-imex.service - $ systemctl mask nvidia-imex.service + $ systemctl disable --now nvidia-imex.service + $ systemctl mask nvidia-imex.service + +.. _dra-driver-install: ******* Install ******* -The following procedures install the GPU Operator and create the ``gpu-cluster`` resource. -The Operator deploys the DRA driver operands in the GPU Operator namespace. +The following procedures install the GPU Operator with the DRA Driver. +The GPU Operator runs the DRA Driver in the GPU Operator namespace. +The Helm chart creates the cluster-scoped ``GPUCluster`` resource that the Operator uses to manage DRA components. +A cluster supports only one ``GPUCluster`` resource, which must be named ``gpu-cluster``. +The ``GPUCluster`` resource does not manage the NVIDIA GPU driver. +Use an ``NVIDIADriver`` resource to install a containerized GPU driver or use a driver that is pre-installed on the host. + +The Helm commands set the following values: + +* ``gpuCluster.deployCR=true`` enables the GPU Operator to install and manage the DRA Driver. +* ``clusterPolicy.deployCR=false`` prevents creation of the ClusterPolicy resource. + The chart fails if you set both ``gpuCluster.deployCR`` and ``clusterPolicy.deployCR`` to ``true``. +* ``driver.nvidiaDriverCRD.enabled=true`` enables the GPU Operator to install the NVIDIA GPU driver through an ``NVIDIADriver`` resource. + This value controls the NVIDIA GPU driver, not the DRA Driver. + The Operator-Managed Driver procedure requires this value. +* ``driver.enabled=false`` uses the NVIDIA GPU driver that is pre-installed on the host. + The Pre-Installed Driver procedure uses this value. #. Add the NVIDIA Helm repository: @@ -256,7 +272,7 @@ The Operator deploys the DRA driver operands in the GPU Operator namespace. --set gpuCluster.deployCR=true \ --set driver.nvidiaDriverCRD.enabled=true - The chart creates the default ``NVIDIADriver`` resource to manage the NVIDIA GPU driver. + The chart creates the default ``NVIDIADriver`` resource to manage the NVIDIA GPU driver, not the DRA Driver. .. tab-item:: Pre-Installed Driver :sync: preinstalled @@ -295,14 +311,14 @@ The following settings provide the primary configuration surface: - Description * - ``draDriver.repository``, ``draDriver.image``, and ``draDriver.version`` - - Configure the DRA driver container image. + - Configure the DRA Driver container image. * - ``draDriver.imagePullPolicy`` and ``draDriver.imagePullSecrets`` - - Configure image pulling for the DRA driver containers. + - Configure image pulling for the DRA Driver containers. * - ``draDriver.featureGates`` - - Enable or disable DRA driver feature gates. - The Operator renders the map as the ``FEATURE_GATES`` environment variable for DRA driver containers. + - Enable or disable DRA Driver feature gates. + The Operator renders the map as the ``FEATURE_GATES`` environment variable for DRA Driver containers. * - ``draDriver.gpus.kubeletPlugin`` - Configure environment variables, resource requests and limits, and the gRPC health check for the GPU kubelet-plugin container. @@ -321,9 +337,9 @@ The following settings provide the primary configuration surface: * - ``daemonsets`` - Configure common labels, annotations, and tolerations. - ``daemonsets.priorityClassName`` applies to the DRA driver kubelet plugin and ComputeDomain controller. + ``daemonsets.priorityClassName`` applies to the DRA Driver kubelet plugin and ComputeDomain controller. -For example, the following values enable a DRA driver feature gate, configure container resources, +For example, the following values enable a DRA Driver feature gate, configure container resources, and enable the default gRPC health checks on their default ports: .. code-block:: yaml @@ -396,9 +412,10 @@ During reconciliation, the STATUS column progresses from empty to `notReady` to * ``nvidia-dcgm-exporter-dra`` when DCGM Exporter is enabled * ``nvidia-dcgm-dra`` when standalone DCGM is enabled - The DRA kubelet-plugin DaemonSet runs a GPU container and, + The DRA Driver kubelet-plugin DaemonSet runs a GPU container and, when ComputeDomain support is enabled, a ComputeDomain container. - The DRA validator and enabled telemetry operands run one pod on each GPU node. + The DRA validator and enabled telemetry components run one pod on each GPU node. + The validator allocates a GPU through a ``ResourceClaim`` and verifies that the device is usable. #. Verify that the DeviceClasses are available: @@ -418,13 +435,15 @@ During reconciliation, the STATUS column progresses from empty to `notReady` to vfio.gpu.nvidia.com 2m The ComputeDomain DeviceClasses are present only when ComputeDomain support is enabled. + The ``vfio.gpu.nvidia.com`` DeviceClass requires the alpha ``PassthroughSupport`` feature gate to use VFIO passthrough. + This feature gate is disabled by default. ************************* Running a Sample Workload ************************* Refer to `Request full GPUs `__ -in the DRA driver documentation for information about the following workload-related tasks: +in the DRA Driver documentation for information about the following workload-related tasks: * Request any GPU * Request multiple GPUs in one pod @@ -438,6 +457,7 @@ Telemetry ********* DCGM Exporter is enabled by default with ``GPUCluster`` and uses its embedded host engine. +Standalone DCGM is disabled by default. Set ``dcgm.enabled=true`` to deploy the standalone ``nvidia-dcgm-dra`` host engine instead. When either ``dcgmExporter.enablePodLabels`` or ``dcgmExporter.enablePodUID`` is enabled, @@ -451,19 +471,21 @@ This enables pod metadata enrichment for GPUs allocated through DRA. Upgrade ******* -The DRA driver is upgraded as part of the GPU Operator release. +The DRA Driver is upgraded as part of the GPU Operator release. When you upgrade the GPU Operator, preserve ``clusterPolicy.deployCR=false`` and ``gpuCluster.deployCR=true`` in your values. -You can select a different DRA driver version by setting ``draDriver.version``. +You can select a different DRA Driver version by setting ``draDriver.version``. Refer to :ref:`Upgrading the NVIDIA GPU Operator` for the Operator upgrade procedure and required CRD updates. During an Operator-managed NVIDIA GPU driver upgrade, pods with allocated ``gpu.nvidia.com`` ResourceClaims are treated as GPU workloads. -The driver upgrade policy applies to those pods, and the DRA kubelet plugin remains available while claims are unprepared. +The driver upgrade policy applies to those pods, and the DRA Driver kubelet plugin remains available while claims are unprepared. You do not need to configure a separate node label for DRA workload eviction. -This procedure does not migrate a standalone DRA driver Helm release to ``GPUCluster``. -For a standalone installation, refer to the `upstream DRA driver upgrade guide `__ +This procedure does not migrate a standalone DRA Driver Helm release to ``GPUCluster``. +For a standalone installation, refer to the `upstream DRA Driver upgrade guide `__ or select the GPU Operator documentation version that matches the installed release. +.. _dra-driver-uninstall: + ********* Uninstall ********* @@ -485,7 +507,7 @@ The chart includes a ``pre-delete`` hook that deletes ``gpu-cluster`` and waits release "gpu-operator" uninstalled -The finalizer removes Operator-managed DaemonSets that consume ResourceClaims before the DRA kubelet plugin is removed. +The finalizer removes Operator-managed DaemonSets that consume ResourceClaims before the DRA Driver kubelet plugin is removed. Do not use ``helm uninstall --no-hooks`` while ``gpu-cluster`` exists because Helm can remove the Operator before this teardown completes. Refer to :doc:`uninstall` for the complete uninstall procedure and CRD cleanup information. @@ -503,10 +525,10 @@ The following resources are left in the cluster with no controller to reconcile * The ``gpu-cluster`` resource, which cannot be deleted because the ``gpucluster.nvidia.com/dra-resourceclaim`` finalizer requires the Operator. -* The DRA driver kubelet plugin, DRA validator, and DCGM Exporter pods. +* The DRA Driver kubelet plugin, DRA validator, and DCGM Exporter pods. * Operator-managed ResourceClaims for the preceding pods. -To recover, remove the finalizer from ``gpu-cluster``, then force-delete the orphaned operands: +To recover, remove the finalizer from ``gpu-cluster``, then force-delete the remaining managed components: #. Remove the finalizer from ``gpu-cluster``: @@ -543,18 +565,18 @@ Clean Up ResourceClaims Stuck in ``deleted,allocated,reserved`` =============================================================== ResourceClaims in the ``deleted,allocated,reserved`` state indicate that the API server -accepted a delete request, but the DRA driver kubelet plugin has not completed the +accepted a delete request, but the DRA Driver kubelet plugin has not completed the device _unprepare_ step for the claim. -This state can persist if the DRA driver kubelet plugin was removed or restarted +This state can persist if the DRA Driver kubelet plugin was removed or restarted before it could unprepare the allocated devices. Take one of the following actions: -* If the DRA driver kubelet plugin can be restarted, ensure that the +* If the DRA Driver kubelet plugin can be restarted, ensure that the ``nvidia-dra-driver-kubelet-plugin`` pod is running. The plugin completes the unprepare step and the ResourceClaims are removed. -* If the DRA driver kubelet plugin cannot be restarted, such as after an +* If the DRA Driver kubelet plugin cannot be restarted, such as after an uninstall that skipped the pre-delete hook, remove the finalizers from the affected ResourceClaims: diff --git a/gpu-operator/getting-started.rst b/gpu-operator/getting-started.rst index b15d04db4..8d04895d6 100644 --- a/gpu-operator/getting-started.rst +++ b/gpu-operator/getting-started.rst @@ -385,8 +385,10 @@ To view all the options, run ``helm show values nvidia/gpu-operator``. - ``false`` * - ``clusterPolicy.deployCR`` - - When set to ``true``, the chart creates the ``ClusterPolicy`` resource for the NVIDIA Kubernetes Device Plugin enablement stack. - Set this value to ``false`` when using ``gpuCluster.deployCR=true``. + - Set to ``true`` to have the GPU Operator allocate GPUs with the NVIDIA Kubernetes Device Plugin. + The chart creates the ``ClusterPolicy`` resource for the Device Plugin. + Set to ``false`` if you set ``gpuCluster.deployCR=true`` to install the DRA Driver for NVIDIA GPUs. + The chart fails if both values are ``true``. - ``true`` * - ``cdi.enabled`` @@ -490,6 +492,8 @@ To view all the options, run ``helm show values nvidia/gpu-operator``. * - ``driver.nvidiaDriverCRD.enabled`` - When set to ``true``, the Operator deploys NVIDIA GPU Driver Custom Resource Definition. + This value controls the NVIDIA GPU driver, not the DRA Driver for NVIDIA GPUs. + If you set ``gpuCluster.deployCR=true`` and the GPU Operator installs the NVIDIA GPU driver, set this value to ``true``. Refer to the :doc:`NVIDIA Driver Custom Resource Definition ` page for more information. - ``false`` @@ -499,17 +503,20 @@ To view all the options, run ``helm show values nvidia/gpu-operator``. - ``nvcr.io/nvidia`` * - ``draDriver.computeDomains.enabled`` - - When set to ``true``, the ``GPUCluster`` stack deploys the ComputeDomain controller and kubelet plugin. + - When set to ``true``, the Operator deploys the ComputeDomain controller and kubelet plugin for a ``GPUCluster`` installation. Refer to :doc:`DRA Driver for NVIDIA GPUs ` for more information. - ``true`` * - ``draDriver.version`` - - Version of the DRA Driver for NVIDIA GPUs deployed by the ``GPUCluster`` stack. + - Version of the DRA Driver for NVIDIA GPUs that the Operator deploys for a ``GPUCluster`` installation. - ``v${dra_version}`` * - ``gpuCluster.deployCR`` - - When set to ``true``, the chart creates the ``GPUCluster`` resource for the DRA enablement stack. - Set ``clusterPolicy.deployCR=false`` and refer to :doc:`DRA Driver for NVIDIA GPUs ` for the complete installation procedure. + - Set to ``true`` to have the GPU Operator install and manage the DRA Driver for NVIDIA GPUs. + By default, the GPU Operator does not install the DRA Driver. + If you set this value to ``true``, also set ``clusterPolicy.deployCR=false``. + If the GPU Operator installs the NVIDIA GPU driver, also set ``driver.nvidiaDriverCRD.enabled=true``. + For the Helm commands, refer to :ref:`Install the DRA Driver `. - ``false`` * - ``driver.rdma.enabled`` @@ -611,7 +618,7 @@ To view all the options, run ``helm show values nvidia/gpu-operator``. Refer to the :doc:`KubeVirt ` or the :doc:`Kata Containers ` pages for more information on using KubeVirt or Kata based workloads. - ``kubevirt`` * - ``toolkit.enabled`` - - By default, the Operator deploys the NVIDIA Container Toolkit (``nvidia-docker2`` stack) + - By default, the Operator deploys the NVIDIA Container Toolkit as a container on the system. Set this value to ``false`` when using the Operator on systems with pre-installed NVIDIA runtimes. - ``true`` From c8631f15a92879579549b6ea755dc33e2f319b54 Mon Sep 17 00:00:00 2001 From: Mike McKiernan Date: Mon, 23 Nov 2026 15:13:39 -0500 Subject: [PATCH 2/2] fix: Reorder Headings and use resource names Signed-off-by: Mike McKiernan --- gpu-operator/dra-intro-install.rst | 84 +++++++++++++++--------------- gpu-operator/getting-started.rst | 26 ++++----- 2 files changed, 56 insertions(+), 54 deletions(-) diff --git a/gpu-operator/dra-intro-install.rst b/gpu-operator/dra-intro-install.rst index ef8694843..781598b33 100644 --- a/gpu-operator/dra-intro-install.rst +++ b/gpu-operator/dra-intro-install.rst @@ -51,8 +51,8 @@ The following table compares the GPU allocation capabilities of the two mechanis :widths: 23 38 39 * - Capability - - DRA with ``GPUCluster`` - - Device Plugin with ``ClusterPolicy`` + - DRA with a ``GPUCluster`` resource + - Device Plugin with a ``ClusterPolicy`` resource * - API and Device Selection - Uses DRA API to select GPUs by attributes---model, architecture, memory, compute capability, UUID, addressing mode, PCI/topology information---using CEL expressions. @@ -68,7 +68,7 @@ The following table compares the GPU allocation capabilities of the two mechanis MIG Manager configures MIG geometry before allocation. * - GPU Sharing - - Alpha ``ConsumableShares`` feature gate implements Kubernetes consumable capacity for scheduler-accounted sharing among independent ``ResourceClaim`` objects for full GPUs and MIG devices. + - Alpha ``ConsumableShares`` feature gate implements Kubernetes consumable capacity for scheduler-accounted sharing among independent resource claims for full GPUs and MIG devices. The driver also supports time-slicing through a shared DRA claim. Custom time-slice intervals require the Alpha ``TimeSlicingSettings`` feature gate. MPS requires the Alpha ``MPSSupport`` gate. @@ -88,7 +88,7 @@ The following table compares the GPU allocation capabilities of the two mechanis - Supports multiple device injection strategies. * - Components Managed by the Operator - - With ``GPUCluster``, the Operator manages: + - With a ``GPUCluster`` resource, the Operator manages: * DRA Driver kubelet plugin * ComputeDomain controller and kubelet plugin, when enabled @@ -96,7 +96,7 @@ The following table compares the GPU allocation capabilities of the two mechanis * DCGM Exporter, when enabled * Standalone NVIDIA Data Center GPU Manager (DCGM), when enabled - - With ``ClusterPolicy``, the Operator manages: + - With a ``ClusterPolicy`` resource, the Operator manages: * NVIDIA Container Toolkit * GPU Feature Discovery @@ -107,7 +107,7 @@ The following table compares the GPU allocation capabilities of the two mechanis * NVIDIA vGPU Manager * - Kubernetes Scheduling - - Allocation through a ``ResourceClaim``, which can be referenced by multiple containers or Pods. + - Allocation through a resource claim, which can be referenced by multiple containers or pods. - Allocation through the resource limits specified for the container. DRA Driver Feature Maturity @@ -157,7 +157,7 @@ Consider the following limitations before selecting DRA Driver v${dra_version}: The gRPC health probe reports kubelet plugin availability, and DCGM provides telemetry. Neither provides DRA allocation health status. * Consumable capacity is available through the alpha ``ConsumableShares`` feature gate, which is disabled by default. - When enabled, the feature provides scheduler-accounted capacity sharing among independent ``ResourceClaim`` objects for full GPUs and MIG devices. + When enabled, the feature provides scheduler-accounted capacity sharing among independent resource claims for full GPUs and MIG devices. Kubernetes v1.34 and v1.35 require enabling the ``DRAConsumableCapacity`` feature gate. Kubernetes v1.36 and later enable the feature by default. You must also set the ``CONSUMABLE_SHARES`` environment variable for the DRA Driver kubelet plugin to ``memory``, ``unlimited``, or a positive integer. @@ -168,25 +168,30 @@ Consider the following limitations before selecting DRA Driver v${dra_version}: ``PassthroughSupport`` conflicts with ``NVMLDeviceHealthCheck``, and ``DeviceMetadata`` requires ``PassthroughSupport``. * Kubernetes does not support preemption for DRA resources. Injecting DRA-allocated devices requires a preconfigured CDI-compatible container runtime. - The managed ``gpu.nvidia.com`` ``DeviceClass`` does not set ``spec.extendedResourceName`` to ``nvidia.com/gpu``. + The managed ``gpu.nvidia.com`` device class does not set ``spec.extendedResourceName`` to ``nvidia.com/gpu``. ************************ Installation Limitations ************************ * Use this workflow for a new installation. - An in-place migration from a standalone DRA Driver Helm release or from ``ClusterPolicy`` to ``GPUCluster`` is not supported. -* ``GPUCluster`` does not expose the controller affinity, priority class, toleration, + An in-place migration from a standalone DRA Driver Helm release or from a ``ClusterPolicy`` resource to a ``GPUCluster`` resource is not supported. +* The ``GPUCluster`` resource does not expose the controller affinity, priority class, toleration, and kubelet-plugin node selector overrides that were used by the previous standalone DRA Driver procedure for Google Kubernetes Engine (GKE). This page does not provide a managed DRA installation procedure for GKE. -************* +.. _dra-driver-install: + +******* +Install +******* + Prerequisites -************* +============= In addition to ensuring that your GPUs and cluster align with the :ref:`GPU Operator support matrix `, verify the following prerequisites: -* Kubernetes v1.34.2 or later with a ``resource.k8s.io`` ``DeviceClass`` API available. +* Kubernetes v1.34.2 or later with the ``DeviceClass`` resource available in the ``resource.k8s.io`` API group. * NVIDIA GPU driver version 580 or later. The Operator can install the driver or you can use a pre-installed driver. * A container runtime that supports CDI and is configured to use CDI for injecting DRA-allocated devices. @@ -196,15 +201,15 @@ In addition to ensuring that your GPUs and cluster align with the :ref:`GPU Oper $ kubectl get clusterpolicy - If a ``ClusterPolicy`` exists, use a new cluster for the ``GPUCluster`` workflow. + If a ``ClusterPolicy`` resource exists, use a new cluster for the DRA workflow. .. note:: To use an extended-resource request with the DRA Driver, enable the `DRAExtendedResource `_ feature gate. This feature gate is enabled by default in Kubernetes v1.36.0 and later. - Request ``deviceclass.resource.kubernetes.io/gpu.nvidia.com`` to use the managed ``gpu.nvidia.com`` ``DeviceClass``. - The legacy name ``nvidia.com/gpu`` requires a separate ``DeviceClass`` that sets ``spec.extendedResourceName`` to that value. + Request ``deviceclass.resource.kubernetes.io/gpu.nvidia.com`` to use the managed ``gpu.nvidia.com`` device class. + The legacy name ``nvidia.com/gpu`` requires a separate device class that sets ``spec.extendedResourceName`` to that value. .. _computedomain-prereqs: @@ -223,11 +228,8 @@ For ComputeDomain support, verify the following additional prerequisites: $ systemctl disable --now nvidia-imex.service $ systemctl mask nvidia-imex.service -.. _dra-driver-install: - -******* -Install -******* +Procedure +========= The following procedures install the GPU Operator with the DRA Driver. The GPU Operator runs the DRA Driver in the GPU Operator namespace. @@ -239,7 +241,7 @@ Use an ``NVIDIADriver`` resource to install a containerized GPU driver or use a The Helm commands set the following values: * ``gpuCluster.deployCR=true`` enables the GPU Operator to install and manage the DRA Driver. -* ``clusterPolicy.deployCR=false`` prevents creation of the ClusterPolicy resource. +* ``clusterPolicy.deployCR=false`` prevents creation of the ``ClusterPolicy`` resource. The chart fails if you set both ``gpuCluster.deployCR`` and ``clusterPolicy.deployCR`` to ``true``. * ``driver.nvidiaDriverCRD.enabled=true`` enables the GPU Operator to install the NVIDIA GPU driver through an ``NVIDIADriver`` resource. This value controls the NVIDIA GPU driver, not the DRA Driver. @@ -412,12 +414,12 @@ During reconciliation, the STATUS column progresses from empty to `notReady` to * ``nvidia-dcgm-exporter-dra`` when DCGM Exporter is enabled * ``nvidia-dcgm-dra`` when standalone DCGM is enabled - The DRA Driver kubelet-plugin DaemonSet runs a GPU container and, + The DRA Driver kubelet-plugin daemon set runs a GPU container and, when ComputeDomain support is enabled, a ComputeDomain container. The DRA validator and enabled telemetry components run one pod on each GPU node. - The validator allocates a GPU through a ``ResourceClaim`` and verifies that the device is usable. + The validator allocates a GPU through a resource claim and verifies that the device is usable. -#. Verify that the DeviceClasses are available: +#. Verify that the device classes are available: .. code-block:: console @@ -434,8 +436,8 @@ During reconciliation, the STATUS column progresses from empty to `notReady` to mig.nvidia.com 2m vfio.gpu.nvidia.com 2m - The ComputeDomain DeviceClasses are present only when ComputeDomain support is enabled. - The ``vfio.gpu.nvidia.com`` DeviceClass requires the alpha ``PassthroughSupport`` feature gate to use VFIO passthrough. + The ComputeDomain device classes are present only when ComputeDomain support is enabled. + The ``vfio.gpu.nvidia.com`` device class requires the alpha ``PassthroughSupport`` feature gate to use VFIO passthrough. This feature gate is disabled by default. ************************* @@ -456,12 +458,12 @@ in the DRA Driver documentation for information about the following workload-rel Telemetry ********* -DCGM Exporter is enabled by default with ``GPUCluster`` and uses its embedded host engine. +DCGM Exporter is enabled by default with a ``GPUCluster`` resource and uses its embedded host engine. Standalone DCGM is disabled by default. Set ``dcgm.enabled=true`` to deploy the standalone ``nvidia-dcgm-dra`` host engine instead. When either ``dcgmExporter.enablePodLabels`` or ``dcgmExporter.enablePodUID`` is enabled, -the Operator enables DRA ``ResourceSlice`` attribution in DCGM Exporter and grants the exporter read access to ``ResourceSlice`` objects. +the Operator enables DRA resource slice attribution in DCGM Exporter and grants the exporter read access to ``ResourceSlice`` objects. This enables pod metadata enrichment for GPUs allocated through DRA. .. _dra-driver-upgrade: @@ -476,11 +478,11 @@ When you upgrade the GPU Operator, preserve ``clusterPolicy.deployCR=false`` and You can select a different DRA Driver version by setting ``draDriver.version``. Refer to :ref:`Upgrading the NVIDIA GPU Operator` for the Operator upgrade procedure and required CRD updates. -During an Operator-managed NVIDIA GPU driver upgrade, pods with allocated ``gpu.nvidia.com`` ResourceClaims are treated as GPU workloads. +During an Operator-managed NVIDIA GPU driver upgrade, pods with allocated ``gpu.nvidia.com`` resource claims are treated as GPU workloads. The driver upgrade policy applies to those pods, and the DRA Driver kubelet plugin remains available while claims are unprepared. You do not need to configure a separate node label for DRA workload eviction. -This procedure does not migrate a standalone DRA Driver Helm release to ``GPUCluster``. +This procedure does not migrate a standalone DRA Driver Helm release to a ``GPUCluster`` resource. For a standalone installation, refer to the `upstream DRA Driver upgrade guide `__ or select the GPU Operator documentation version that matches the installed release. @@ -490,11 +492,11 @@ or select the GPU Operator documentation version that matches the installed rele Uninstall ********* -Before uninstalling the GPU Operator, delete user workloads and user-created ResourceClaims for GPUs +Before uninstalling the GPU Operator, delete user workloads and user-created resource claims for GPUs and verify that the workload pods terminate and the claims are unprepared. Afterward, uninstall the GPU Operator by using Helm. -The chart includes a ``pre-delete`` hook that deletes ``gpu-cluster`` and waits for the GPUCluster finalizer to perform ordered teardown. +The chart includes a ``pre-delete`` hook that deletes ``gpu-cluster`` and waits for the ``GPUCluster`` resource finalizer to perform ordered teardown. .. tip:: The uninstall command output can report that the ``gpu-cluster`` resource was kept. @@ -507,7 +509,7 @@ The chart includes a ``pre-delete`` hook that deletes ``gpu-cluster`` and waits release "gpu-operator" uninstalled -The finalizer removes Operator-managed DaemonSets that consume ResourceClaims before the DRA Driver kubelet plugin is removed. +The finalizer removes Operator-managed daemon sets that consume resource claims before the DRA Driver kubelet plugin is removed. Do not use ``helm uninstall --no-hooks`` while ``gpu-cluster`` exists because Helm can remove the Operator before this teardown completes. Refer to :doc:`uninstall` for the complete uninstall procedure and CRD cleanup information. @@ -526,7 +528,7 @@ The following resources are left in the cluster with no controller to reconcile * The ``gpu-cluster`` resource, which cannot be deleted because the ``gpucluster.nvidia.com/dra-resourceclaim`` finalizer requires the Operator. * The DRA Driver kubelet plugin, DRA validator, and DCGM Exporter pods. -* Operator-managed ResourceClaims for the preceding pods. +* Operator-managed resource claims for the preceding pods. To recover, remove the finalizer from ``gpu-cluster``, then force-delete the remaining managed components: @@ -537,7 +539,7 @@ To recover, remove the finalizer from ``gpu-cluster``, then force-delete the rem $ kubectl patch gpucluster gpu-cluster --type=json \ -p='[{"op":"remove","path":"/metadata/finalizers"}]' -#. Remove finalizers from the orphaned ResourceClaims in the GPU Operator namespace: +#. Remove finalizers from the orphaned resource claims in the GPU Operator namespace: .. code-block:: console @@ -561,10 +563,10 @@ To recover, remove the finalizer from ``gpu-cluster``, then force-delete the rem To avoid this recovery path, run ``helm uninstall`` without ``--no-hooks`` so that the ``pre-delete`` hook can complete ordered teardown. -Clean Up ResourceClaims Stuck in ``deleted,allocated,reserved`` -=============================================================== +Clean Up Resource Claims Stuck in ``deleted,allocated,reserved`` +================================================================ -ResourceClaims in the ``deleted,allocated,reserved`` state indicate that the API server +resource claims in the ``deleted,allocated,reserved`` state indicate that the API server accepted a delete request, but the DRA Driver kubelet plugin has not completed the device _unprepare_ step for the claim. This state can persist if the DRA Driver kubelet plugin was removed or restarted @@ -574,11 +576,11 @@ Take one of the following actions: * If the DRA Driver kubelet plugin can be restarted, ensure that the ``nvidia-dra-driver-kubelet-plugin`` pod is running. - The plugin completes the unprepare step and the ResourceClaims are removed. + The plugin completes the unprepare step and the resource claims are removed. * If the DRA Driver kubelet plugin cannot be restarted, such as after an uninstall that skipped the pre-delete hook, remove the finalizers from - the affected ResourceClaims: + the affected resource claims: .. code-block:: console diff --git a/gpu-operator/getting-started.rst b/gpu-operator/getting-started.rst index 8d04895d6..9025c54b6 100644 --- a/gpu-operator/getting-started.rst +++ b/gpu-operator/getting-started.rst @@ -50,13 +50,13 @@ Prerequisites && chmod 700 get_helm.sh \ && ./get_helm.sh -#. If you are planning to use ClusterPolicy for driver configuration, all worker nodes or node groups to run GPU workloads in the Kubernetes cluster must run the same operating system version to use the NVIDIA GPU Driver container. +#. If you are planning to use a ``ClusterPolicy`` resource for driver configuration, all worker nodes or node groups to run GPU workloads in the Kubernetes cluster must run the same operating system version to use the NVIDIA GPU Driver container. Alternatively, if you pre-install the NVIDIA GPU Driver on the nodes, then you can run different operating systems. For worker nodes or node groups that run CPU workloads only, the nodes can run any operating system because the GPU Operator does not perform any configuration or management of nodes for CPU-only workloads. - If you are planning to use NVIDIA GPU Driver Custom Resource Definition, you can use a mix of operating system versions on CPU and GPU nodes. Refer to the :doc:`NVIDIA Driver Custom Resource Definition ` page for more information. + If you are planning to use the NVIDIA GPU driver custom resource definition, you can use a mix of operating system versions on CPU and GPU nodes. Refer to the :doc:`NVIDIA Driver Custom Resource Definition ` page for more information. #. Nodes must be configured with a container engine such as CRI-O or containerd. @@ -192,7 +192,7 @@ running workloads. The above output is for a default install. If you installed the Operator with custom configuration, you may see different pods. -#. Verify the ``ClusterPolicy`` is in the ``ready`` state: +#. Verify the ``ClusterPolicy`` resource is in the ``ready`` state: .. code-block:: console @@ -438,22 +438,22 @@ To view all the options, run ``helm show values nvidia/gpu-operator``. - ``false`` * - ``dcgmExporter.annotations`` - - Map of custom annotations to add to the DCGM Exporter DaemonSet. + - Map of custom annotations to add to the DCGM Exporter daemon set. - ``{}`` * - ``dcgmExporter.enablePodLabels`` - When set to ``true``, Kubernetes pod labels are added as Prometheus label dimensions on the GPU metrics. - Enabling this option causes the Operator to provision a cluster-scoped ClusterRole and ClusterRoleBinding + Enabling this option causes the Operator to provision a cluster role and cluster role binding (``nvidia-dcgm-exporter-read-pods``) that grants the DCGM Exporter service account ``get``, ``list``, and ``watch`` access to pods. - For a ``GPUCluster`` installation, enabling this option also enables DRA attribution and grants read access to ``ResourceSlice`` objects. + For an installation with a ``GPUCluster`` resource, enabling this option also enables DRA attribution and grants read access to ``ResourceSlice`` objects. Use ``dcgmExporter.podLabelAllowlistRegex`` to limit which labels are emitted. - ``false`` * - ``dcgmExporter.enablePodUID`` - When set to ``true``, the Kubernetes pod UID is added as a Prometheus label dimension on the GPU metrics. - Like ``dcgmExporter.enablePodLabels``, this provisions a cluster-scoped ClusterRole and ClusterRoleBinding that grants the DCGM Exporter + Like ``dcgmExporter.enablePodLabels``, this provisions a cluster role and cluster role binding that grants the DCGM Exporter service account ``get``, ``list``, and ``watch`` access to pods. - For a ``GPUCluster`` installation, enabling this option also enables DRA attribution and grants read access to ``ResourceSlice`` objects. + For an installation with a ``GPUCluster`` resource, enabling this option also enables DRA attribution and grants read access to ``ResourceSlice`` objects. - ``false`` * - ``dcgmExporter.podLabelAllowlistRegex`` @@ -491,7 +491,7 @@ To view all the options, run ``helm show values nvidia/gpu-operator``. - ``auto`` * - ``driver.nvidiaDriverCRD.enabled`` - - When set to ``true``, the Operator deploys NVIDIA GPU Driver Custom Resource Definition. + - When set to ``true``, the Operator deploys the NVIDIA GPU driver custom resource definition. This value controls the NVIDIA GPU driver, not the DRA Driver for NVIDIA GPUs. If you set ``gpuCluster.deployCR=true`` and the GPU Operator installs the NVIDIA GPU driver, set this value to ``true``. Refer to the :doc:`NVIDIA Driver Custom Resource Definition ` page for more information. @@ -503,12 +503,12 @@ To view all the options, run ``helm show values nvidia/gpu-operator``. - ``nvcr.io/nvidia`` * - ``draDriver.computeDomains.enabled`` - - When set to ``true``, the Operator deploys the ComputeDomain controller and kubelet plugin for a ``GPUCluster`` installation. + - When set to ``true``, the Operator deploys the ComputeDomain controller and kubelet plugin for an installation with a ``GPUCluster`` resource. Refer to :doc:`DRA Driver for NVIDIA GPUs ` for more information. - ``true`` * - ``draDriver.version`` - - Version of the DRA Driver for NVIDIA GPUs that the Operator deploys for a ``GPUCluster`` installation. + - Version of the DRA Driver for NVIDIA GPUs that the Operator deploys for an installation with a ``GPUCluster`` resource. - ``v${dra_version}`` * - ``gpuCluster.deployCR`` @@ -872,7 +872,7 @@ MicroK8s ======== -For MicroK8s, set the following in the ``ClusterPolicy``. +For MicroK8s, set the following in the ``ClusterPolicy`` resource. .. code-block:: yaml @@ -931,6 +931,6 @@ After verifying the installation, you can configure the GPU Operator for your wo - :doc:`gpu-operator-mig` — Configure Multi-Instance GPU (MIG) partitioning on supported GPUs. - :doc:`gpu-operator-rdma` — Enable GPUDirect RDMA for high-performance networking. - :doc:`dra-intro-install` — Allocate GPUs by using Kubernetes Dynamic Resource Allocation (DRA). -- :doc:`nvidia-driver-configuration` — Use the NVIDIA GPU Driver Custom Resource Definition to manage drivers per node. +- :doc:`nvidia-driver-configuration` — Use the NVIDIA GPU driver custom resource definition to manage drivers per node. - :doc:`precompiled-drivers` — Speed up driver deployments with precompiled kernel modules. - :doc:`cdi` — Learn about Container Device Interface (CDI) and NRI Plugin mode.