The module lifecycle stage: Generally available version

The module has requirements for installation

A GPUPool is an administrator-defined pool of GPUs. It describes which cards belong to the pool and which partition and sharing options are allowed. The module turns that into a set of DeviceClass objects, each with an extended resource name that users can request directly.

This is the recommended way to expose GPUs to users. Without a GPUPool, every user has to author their own DeviceClass with a hand-written CEL selector — that path is described in Usage.

GPUPool is a cluster-scoped resource. Short name: gpupl.

Migrating from GPUClass

GPUPool replaces the deprecated GPUClass resource; the spec is the same. gpu-controller no longer processes GPUClass:

  • Existing GPUClass objects and the DeviceClass objects they generated stay in the cluster and keep serving Pods.
  • They are no longer updated: changes to a GPUClass, new cards, new partition profiles, or sharing strategies are not reflected in them.

The GPUClass resource is removed in the next module release. Every GPUClass left at that point is deleted together with its DeviceClass objects, and new Pods requesting their extended resources stop being admitted. Migrate every GPUClass before upgrading.

To find GPUClass objects that are left to migrate, use:

d8 k get gpuclasses

Migrate each GPUClass to a GPUPool with the same name. DeviceClass names and extended resource names stay the same, so workloads need no changes. The example below uses ml-ai-h100; replace it with your name.

  1. Save the GPUClass as a GPUPool manifest:

    d8 k get gpuclass ml-ai-h100 -o yaml \
      | yq '{"apiVersion": .apiVersion, "kind": "GPUPool", "metadata": {"name": .metadata.name}, "spec": .spec}' \
      > gpupool-ml-ai-h100.yaml
  2. Delete the GPUClass and wait until its DeviceClass objects are removed:

    d8 k delete gpuclass ml-ai-h100
    while d8 k get deviceclasses -l gpu.deckhouse.io/gpuclass=ml-ai-h100 -o name | grep -q .; do sleep 2; done
  3. Create the GPUPool:

    d8 k apply -f gpupool-ml-ai-h100.yaml
  4. Check that the pool has been reconciled and has generated the same DeviceClass objects:

    d8 k get gpupool ml-ai-h100
    d8 k get deviceclasses -l gpu.deckhouse.io/gpupool=ml-ai-h100

Between steps 2 and 4, new Pods requesting extended resources of this pool are rejected at admission; Deployments and Jobs retry on their own. Running Pods keep their GPUs.

The manifest from step 1 keeps only the name and spec. If you rely on labels or annotations of the GPUClass object, add them to the manifest before step 3.

The order of steps 2 and 3 matters. While DeviceClass objects of a GPUClass exist, a GPUPool with the same name is rejected with a message that names the GPUClass and asks to delete it first.

If the GPUClass is managed through GitOps, replace its manifest with the GPUPool manifest in the repository before step 2; otherwise the GitOps tool recreates the GPUClass.

Using GPUPool resources

How GPUPool works:

  1. The cluster administrator creates a GPUPool with a selector over PhysicalGPU objects.
  2. gpu-controller finds the matching cards and reads their capabilities — which MIG profiles they support and which sharing strategies are available.
  3. For every allowed combination it creates a DeviceClass owned by that GPUPool. Each one gets an extendedResourceName.
  4. Users request a GPU by that extended resource name. The module’s mutating webhook creates the ResourceClaim for them.

Deleting a GPUPool deletes all DeviceClass objects it generated (they are bound to the GPUPool via owner references).

Minimal GPUPool example

Every GPU in the cluster, whole cards only:

apiVersion: gpu.deckhouse.io/v1alpha1
kind: GPUPool
metadata:
  name: gpu-any
spec: {}

An empty spec means “all PhysicalGPU objects, all supported partition profiles, all supported sharing strategies”. On a mixed cluster this generates a large number of DeviceClass objects, so in practice you need a selector.

Selecting cards

spec.selector is a standard label selector over PhysicalGPU objects. An empty selector matches everything.

Available PhysicalGPU labels:

Label Example Meaning
gpu.deckhouse.io/vendor nvidia, metax, amd, intel GPU vendor.
gpu.deckhouse.io/device a100-sxm4-40gb, h100-sxm5-96gb, tesla-t4 Card model.
gpu.deckhouse.io/node worker-1 Node the card is installed in.
gpu.deckhouse.io/sharing.mps true The card supports MPS.
gpu.deckhouse.io/sharing.ts true The card supports time-slicing.

To list all PhysicalGPUs in the cluster and their labels, use:

d8 k get physicalgpus --show-labels

Example of a GPU pool limited to one model:

apiVersion: gpu.deckhouse.io/v1alpha1
kind: GPUPool
metadata:
  name: a100
spec:
  selector:
    matchLabels:
      gpu.deckhouse.io/device: a100-sxm4-40gb

Restricting partition profiles

spec.partitionFilter limits which MIG profiles the pool exposes. Use allow as a whitelist or deny as a blacklist.

Profile names in the filter must be DNS labels: write 1g5gb, not 1g.5gb. These names are used to build DeviceClass names, which cannot contain dots. A dotted value is rejected by the admission webhook with partitionFilter value "1g.5gb" must be a DNS label: must not contain dots.

To see which profiles a card supports, use:

d8 k get physicalgpu <name> -o jsonpath='{.status.capabilities.partitionSupport.profiles[*].name}'

This command prints the hardware names (1g.5gb, 2g.10gb, …). Strip the dots when writing them into the filter.

Example GPUPool that publishes only small A100 partitions:

apiVersion: gpu.deckhouse.io/v1alpha1
kind: GPUPool
metadata:
  name: a100-small
spec:
  selector:
    matchLabels:
      gpu.deckhouse.io/device: a100-sxm4-40gb
  partitionFilter:
    allow:
      - 1g5gb
      - 2g10gb

Everything except the full-card partition:

spec:
  partitionFilter:
    deny:
      - 7g40gb

Restricting sharing

spec.sharingFilter limits which sharing strategies the pool exposes. Valid names are mps and ts; only strategies the hardware actually supports are used.

Example of a pool for exclusive use only — shared access to these cards is fully denied:

apiVersion: gpu.deckhouse.io/v1alpha1
kind: GPUPool
metadata:
  name: a100-exclusive
spec:
  selector:
    matchLabels:
      gpu.deckhouse.io/device: a100-sxm4-40gb
  sharingFilter:
    deny:
      - mps
      - ts

Example of a pool that only allows MPS:

spec:
  sharingFilter:
    allow:
      - mps

Generated DeviceClass names

Names are built from the pool name plus partition and sharing segments:

Generated name What it allocates
<pool> A whole card, exclusive.
<pool>-<partition> A MIG partition of that profile, exclusive.
<pool>-<sharing>-percent A share of a whole card.
<pool>-<partition>-<sharing>-percent A share of a MIG partition.

For example, a pool named ml-ai-h100 that allows the 1g12gb profile and MPS produces ml-ai-h100, ml-ai-h100-1g12gb, ml-ai-h100-mps-percent, and ml-ai-h100-1g12gb-mps-percent.

Generated objects get labels that make them easy to find and audit:

d8 k get deviceclasses -l gpu.deckhouse.io/gpupool=ml-ai-h100
Label Meaning
gpu.deckhouse.io/gpupool The owning GPUPool.
gpu.deckhouse.io/managed-by=gpu-controller Generated, not hand-written. Do not edit it.
gpu.deckhouse.io/partition The partition profile; absent for whole-card classes.
gpu.deckhouse.io/sharing mps or ts; absent for exclusive classes.
gpu.deckhouse.io/capacity-units 1 for exclusive classes, 100 for -percent classes — the unit the user requests.

Treat the naming scheme as a convenience, not a contract. The authoritative list is always in .status.deviceClassNames on the GPUPool.

Viewing available GPUPool objects

To list GPUPool objects available in the cluster, use:

d8 k get gpupools

Example output:

NAME         STATE        GPUS   STATUS   AGE
ml-ai-h100   Reconciled   2               10m

Field meanings in the command output:

Field Meaning
STATE (reason of the Ready condition) Reconciled means the generated classes are up to date, Failed means the last reconciliation did not succeed. Empty until the pool has been reconciled for the first time.
GPUS (.status.matchingPhysicalGPUCount) How many PhysicalGPU objects matched the selector. 0 means the selector is wrong or no matching card exists. It is not a readiness counter: the readiness of those devices lives in their own status.
STATUS (message of the Ready condition) Human-readable message. Empty when there is nothing to report: it is an explanation, not a success indicator. It carries the error text when reconciliation failed, and names the partitionFilter.allow or sharingFilter.allow values that no matching device provides when reconciliation succeeded but part of the pool went uncovered.
AGE Time elapsed since the object was created.

Until gpu-controller is upgraded to the version that writes this message, STATUS instead shows the constant DeviceClasses are reconciled on a healthy pool.

The list of generated DeviceClass names is kept out of the default output because it grows with the number of partition and sharing variants. Add -o wide to see the DEVICECLASSES column (.status.deviceClassNames).

To get the full list of DeviceClass names created from a specific GPU pool, use:

d8 k get gpupool ml-ai-h100 -o jsonpath='{.status.deviceClassNames}' | jq

What information to give users requesting GPUs

Each generated DeviceClass publishes an extended resource named gpu.deckhouse.io/<device-class-name>.

To get that extended resource name, use (ml-ai-h100-1g12gb — replace with your value):

d8 k get deviceclass ml-ai-h100-1g12gb -o jsonpath='{.spec.extendedResourceName}'

Example output:

gpu.deckhouse.io/ml-ai-h100-1g12gb

Users must put this string in the Pod spec to request a GPU. See Usage.

GPU pool specifics and limitations

GPU pools have the following specifics and limitations:

  • Validation is strict and fails closed. The GPUPool webhook has failurePolicy: Fail, so while gpu-controller is unavailable, creating or updating a GPUPool is rejected. Reading and using already-generated DeviceClass objects is unaffected.
  • Pools may overlap. Nothing stops two GPUPool objects from selecting the same cards; they simply produce two sets of names for the same hardware. Allocation conflicts are resolved by the scheduler, not by the pool definition.
  • Filters do not invent capabilities. If you allow a MIG profile or sharing strategy the card does not support, no DeviceClass is created for that combination — it is skipped, with no error message. If an expected name is missing from .status.deviceClassNames, check the card’s .status.capabilities first.
  • Do not edit generated objects. gpu-controller reconciles them, so manual changes are reverted.