Chapter 8. Manage workloads with Kueue


As a cluster administrator, you can manage AI and machine learning workloads at scale by integrating the Red Hat build of Kueue with Red Hat OpenShift AI. This integration provides capabilities for quota management, resource allocation, and prioritized job scheduling.

Important

Starting with OpenShift AI 2.24, the embedded Kueue component for managing distributed workloads is deprecated. Kueue is now provided through Red Hat build of Kueue, which is installed and managed by the Red Hat build of Kueue Operator. You cannot install both the embedded Kueue and the Red Hat build of Kueue Operator on the same cluster because this creates conflicting controllers that manage the same resources.

OpenShift AI does not automatically migrate existing workloads. To ensure your workloads continue using queue management after upgrading, cluster administrators must manually migrate from the embedded Kueue to the Red Hat build of Kueue Operator. For more information, see Migrate to the Red Hat build of Kueue Operator.

8.1. Kueue workload management

You can use Kueue in OpenShift AI to manage AI and machine learning workloads at scale. Kueue controls how cluster resources are allocated and shared through hierarchical quota management, dynamic resource allocation, and prioritized job scheduling. These capabilities help prevent cluster contention, ensure fair access across teams, and optimize the use of heterogeneous compute resources, such as hardware accelerators.

You can use Kueue to schedule diverse workloads, including distributed training jobs (RayJob, RayCluster, PyTorchJob), workbenches (Notebook), and model serving (InferenceService). Kueue validation and queue enforcement apply only to workloads in namespaces with the kueue.openshift.io/managed=true label.

Using Kueue in OpenShift AI provides these benefits:

  • Prevents resource conflicts and prioritizes workload processing
  • Manages quotas across teams and projects
  • Ensures consistent scheduling for all workload types
  • Maximizes GPU and other specialized hardware use
Important

Starting with OpenShift AI 2.24, the embedded Kueue component for managing distributed workloads is deprecated. Kueue is now provided through Red Hat build of Kueue, which is installed and managed by the Red Hat build of Kueue Operator. You cannot install both the embedded Kueue and the Red Hat build of Kueue Operator on the same cluster because this creates conflicting controllers that manage the same resources.

OpenShift AI does not automatically migrate existing workloads. To ensure your workloads continue using queue management after upgrading, cluster administrators must manually migrate from the embedded Kueue to the Red Hat build of Kueue Operator. For more information, see Migrate to the Red Hat build of Kueue Operator in the Additional resources section.

Kueue management states:

You configure how OpenShift AI interacts with Kueue by setting the managementState in the DataScienceCluster object.

Unmanaged

This state is supported for using Kueue with OpenShift AI. In Unmanaged state, OpenShift AI integrates with an existing Kueue installation managed by the Red Hat build of Kueue Operator. You must have the Red Hat build of Kueue Operator installed and running on the cluster.

When you enable Unmanaged mode, the OpenShift AI Operator creates a default Kueue custom resource (CR) if one does not already exist. This prompts the Red Hat build of Kueue Operator to activate Kueue on the cluster.

Managed
This state is deprecated. Previously, OpenShift AI deployed and managed an embedded Kueue distribution. Managed mode is not compatible with the Red Hat build of Kueue Operator. If both are installed, OpenShift AI stops reconciliation to avoid conflicts. You must migrate any environment by using the Managed state to the Unmanaged state to ensure continued support.
Removed
This state disables Kueue in OpenShift AI. If the state was previously Managed, OpenShift AI uninstalls the embedded Kueue distribution. If the state was previously Unmanaged, OpenShift AI stops checking for the external Kueue integration but does not uninstall the Red Hat build of Kueue Operator. An empty managementState value also functions as Removed.

Queue creation modes:

You control whether the OpenShift AI Operator automatically creates default ClusterQueue and LocalQueue resources by setting the autoCreateQueues field in the DataScienceCluster resource.

Operator-managed queues: autoCreateQueues: true
The Operator creates a default ClusterQueue and a LocalQueue in each Kueue-managed namespace. The Operator applies the platform.opendatahub.io/part-of=kueue label to these resources. You can customize the queue names by using the defaultClusterQueueName and defaultLocalQueueName fields. This mode is suitable for quick-start deployments and evaluation environments.
Self-managed queues: autoCreateQueues: false or omitted

The Operator does not create queue resources. You manage all ClusterQueue and LocalQueue resources outside the Operator by using GitOps tools, kubectl, or the Red Hat build of Kueue Operator directly. This mode is the default and is suitable for enterprise multitenant GPU environments that require strict quota control.

For more information, see Manage ClusterQueues and LocalQueues outside the Operator in Additional resources.

Note

When autoCreateQueues transitions from true to false, the Operator stops creating new queue resources but does not remove previously created ClusterQueue or LocalQueue instances.

Queue enforcement for projects:

To ensure workloads do not bypass the queuing system, a validating webhook automatically enforces queuing rules on any project that is enabled for Kueue management. You enable a project for Kueue management by applying the kueue.openshift.io/managed=true label to the project namespace.

Note

This validating webhook enforcement method replaces the Validating Admission Policy that was used with the deprecated embedded Kueue component. The system also supports the legacy kueue-managed label for backward compatibility, but kueue.openshift.io/managed=true is the recommended label going forward.

After a project is enabled for Kueue management, the webhook requires that any new or updated workload has the kueue.x-k8s.io/queue-name label. If this label is missing, the webhook prevents the workload from being created or updated.

When autoCreateQueues is set to true, OpenShift AI creates a default, cluster-scoped ClusterQueue and a namespace-scoped LocalQueue for that namespace if one does not already exist. These default resources are created with the opendatahub.io/managed=false annotation, so they are not managed after creation. Cluster administrators can change or delete them.

When autoCreateQueues is set to false or is omitted, the Operator does not create queue resources. You must create ClusterQueue and LocalQueue resources before submitting workloads.

Note

Enabling Kueue in the OpenShift AI dashboard creates a LocalQueue in new project namespaces independently of the autoCreateQueues setting. This dashboard-triggered queue creation is a separate mechanism from the DataScienceCluster-level queue creation controlled by autoCreateQueues.

The webhook enforces this rule on the create and update operations for the following resource types:

  • InferenceService
  • Notebook
  • PyTorchJob
  • RayCluster
  • RayJob
Note

You can apply hardware profiles to other workload types, but the validation webhook enforces the kueue.x-k8s.io/queue-name label requirement only for these specific resource types.

Restrictions for managing workloads with Kueue:

When you use Kueue to manage workloads in OpenShift AI, the following restrictions apply:

  • Namespaces must be labeled with kueue.openshift.io/managed=true to enable Kueue validation and queue enforcement.
  • All workloads that you create from the OpenShift AI dashboard, such as workbenches and model servers, must use a hardware profile that specifies a local queue.
  • When you specify a local queue in a hardware profile, OpenShift AI automatically applies the corresponding kueue.x-k8s.io/queue-name label to workloads that use that profile.
  • You cannot use hardware profiles that contain node selectors or tolerations for node placement. To direct workloads to specific nodes, use a hardware profile that specifies a local queue that is associated with a queue configured with the appropriate resource flavors.
  • Because workbenches are not suspendable workloads, you can only assign them to a local queue that is associated with a non-preemptive cluster queue.
  • When autoCreateQueues is set to true, the default cluster queue that OpenShift AI creates is non-preemptive. If you manage queues outside the Operator, ensure that your cluster queue is configured as non-preemptive for workbench workloads.

Workbench scheduling visibility:

When a project namespace has the kueue.openshift.io/managed=true label and Kueue is enabled, the OpenShift AI dashboard provides scheduling visibility for workbenches in that project.

The following indicators are available:

Project-level Kueue indicator
An informational banner is displayed on the project details page confirming that the project uses queue-based scheduling. This banner is mutually exclusive with the Kueue-disabled alert.
Workbench scheduling states
The Status column on the Workbenches tab displays Kueue-derived states such as Queued, Inadmissible, Preempted, and Evicted for workbenches in the project. When a workbench is admitted by Kueue, the status column shows Starting rather than a Kueue-specific label. Data scientists can monitor these states to track the progress of their workbenches through the scheduling system.
Anomaly warning for workbenches bypassing Kueue
When a workbench in a Kueue-managed namespace lacks the kueue.x-k8s.io/queue-name label, it bypasses Kueue scheduling entirely. The dashboard shows a warning indicator on those workbench rows with a tooltip explaining the bypass. This situation typically occurs when a workbench is created through GitOps or the command-line interface without a queue assignment.

8.1.1. Kueue workflow

Managing workloads with Kueue in OpenShift AI involves tasks for OpenShift cluster administrators, OpenShift AI administrators, and machine learning (ML) engineers or data scientists:

Cluster administrator

Installs and configures Kueue:

  1. Installs the Red Hat build of Kueue Operator on the cluster, as described in the Red Hat build of Kueue documentation in Additional resources.
  2. Activates the Kueue integration by setting the managementState to Unmanaged in the DataScienceCluster custom resource, as described in Configure workload management with Kueue in Additional resources.
  3. Chooses a queue management mode:

    • Operator-managed queues: Sets autoCreateQueues to true to have the Operator create default ClusterQueue and LocalQueue resources.
    • Self-managed queues: Keeps autoCreateQueues set to false or omits it, then creates ClusterQueue and LocalQueue resources outside the Operator by using GitOps, kubectl, or the Red Hat build of Kueue Operator directly. For more information, see Manage ClusterQueues and LocalQueues outside the Operator in Additional resources.
  4. Configures quotas to optimize resource allocation for user workloads, as described in the Red Hat build of Kueue documentation in Additional resources.
  5. Enables Kueue in the dashboard by setting disableKueue to false in the OdhDashboardConfig custom resource, as described in Enable Kueue in the dashboard in Additional resources.

    Note

    When Kueue is enabled in the dashboard, OpenShift AI automatically enables Kueue management for all new projects created from the dashboard.

OpenShift AI administrator

Prepares the OpenShift AI environment:

  1. Creates Kueue-enabled hardware profiles so that users can submit workloads from the OpenShift AI dashboard, as described in Working with hardware profiles in Additional resources.

ML Engineer or data scientist

Submits workloads to the queuing system and monitors scheduling status:

  1. For workloads created from the OpenShift AI dashboard, such as workbenches and model servers, selects a Kueue-enabled hardware profile during creation.
  2. For workloads created by using a command-line interface or a software development kit (SDK), such as distributed training jobs, adds the kueue.x-k8s.io/queue-name label to the workload’s YAML manifest and sets its value to the target LocalQueue name.
  3. After starting or creating a workbench, views the scheduling status on the Workbenches tab. For Kueue-managed workbenches, the status shows the current Kueue state, such as Queued or Starting, and the queue position when available.
Note

When Kueue is enabled in the dashboard, workbenches that were created through GitOps or the command-line interface without the kueue.x-k8s.io/queue-name label bypass Kueue scheduling and show an anomaly warning on the Workbenches tab.

8.2. Configure workload management with Kueue

To use workload queuing in OpenShift AI, install the Red Hat build of Kueue Operator, activate the Kueue integration, and choose how to manage queue resources. You can have the Operator create default queue resources automatically, or you can manage queues outside the Operator for strict quota control.

Prerequisites

  • You have cluster administrator privileges for your OpenShift cluster.
  • You are using OpenShift 4.19 or later.
  • You have installed and configured the cert-manager Operator for Red Hat OpenShift for your cluster.
  • You have installed the OpenShift CLI (oc) as described in the appropriate documentation for your cluster:

Procedure

  1. In a terminal window, log in to the OpenShift CLI (oc) as shown in the following example:

    $ oc login <openshift_cluster_url> -u <admin_username> -p <password>
  2. Install the Red Hat build of Kueue Operator on your OpenShift cluster as described in the Red Hat build of Kueue documentation.
  3. Activate the Kueue integration. Choose one of the following options based on how you want to manage queue resources.

    Note

    In OpenShift AI 3.5, the autoCreateQueues field defaults to false. The Operator does not create default ClusterQueue or LocalQueue resources unless you explicitly set autoCreateQueues to true.

    • Operator-managed queues with predefined names: To have the Operator create default queue resources with the predefined name default, run the following command. Replace <operator_namespace> with your Operator namespace. The default Operator namespace is redhat-ods-operator.

      $ oc patch datasciencecluster default-dsc --type='merge' -p '{"spec":{"components":{"kueue":{"managementState":"Unmanaged","autoCreateQueues":true}}}}' -n <operator_namespace>
    • Operator-managed queues with custom names: To have the Operator create default queue resources with custom names, run the following command. Replace <example_cluster_queue> and <example_local_queue> with your custom queue names, and replace <operator_namespace> with your Operator namespace. The default Operator namespace is redhat-ods-operator.

      $ oc patch datasciencecluster default-dsc --type='merge' -p '{"spec":{"components":{"kueue":{"managementState":"Unmanaged","autoCreateQueues":true,"defaultClusterQueueName":"<example_cluster_queue>","defaultLocalQueueName":"<example_local_queue>"}}}}' -n <operator_namespace>
    • Self-managed queues: To manage queue resources outside the Operator by using GitOps, kubectl, or the Red Hat build of Kueue Operator directly, run the following command. Replace <operator_namespace> with your Operator namespace. The default Operator namespace is redhat-ods-operator.

      $ oc patch datasciencecluster default-dsc --type='merge' -p '{"spec":{"components":{"kueue":{"managementState":"Unmanaged"}}}}' -n <operator_namespace>

      Because autoCreateQueues defaults to false, this command activates the Kueue integration without creating Operator-managed queue resources. You must create ClusterQueue and LocalQueue resources before submitting workloads. For more information, see Manage ClusterQueues and LocalQueues outside the Operator.

Verification

  1. Verify that the Kueue custom resource was created:

    $ oc get kueue -A

    You see a Kueue CR listed. If no resource is returned, the OpenShift AI Operator has not activated Kueue, and subsequent steps fail.

  2. Verify that the Red Hat build of Kueue pods are running:

    $ oc get pods -n openshift-kueue-operator

    If the Red Hat build of Kueue Operator was installed in a custom namespace, replace openshift-kueue-operator with your namespace.

    You see output similar to the following example:

    kueue-controller-manager-d9fc745df-ph77w    1/1     Running
    openshift-kueue-operator-69cfbf45cf-lwtpm   1/1     Running
  3. If you chose Operator-managed queues, verify that the default ClusterQueue was created:

    $ oc get clusterqueues
  4. If you chose self-managed queues, verify that no Operator-managed ClusterQueue exists:

    $ oc get clusterqueues -l platform.opendatahub.io/part-of=kueue

    The output should show no resources.

8.2.1. Enable Kueue in the dashboard

Enable Kueue in the OpenShift AI dashboard so that users can select Kueue-enabled options when creating workloads.

When you enable Kueue in the dashboard, OpenShift AI automatically enables Kueue management for all new projects created from the dashboard. For these projects, OpenShift AI applies the kueue.openshift.io/managed=true label to the namespace and creates a LocalQueue object if one does not already exist. The LocalQueue object is created with the opendatahub.io/managed=false annotation, so it is not managed after creation. Cluster administrators can modify or delete it as needed. A validating webhook then enforces that any new or updated workload resource in a Kueue-enabled project includes the kueue.x-k8s.io/queue-name label.

Note

This dashboard-triggered LocalQueue creation in new project namespaces is independent of the autoCreateQueues setting in the DataScienceCluster resource. The autoCreateQueues field controls whether the Operator creates default ClusterQueue and LocalQueue resources at the DataScienceCluster level. The dashboard creates a LocalQueue in new projects regardless of whether autoCreateQueues is true or false.

Note

For existing projects, or for projects created by using the OpenShift CLI (oc), you must enable Kueue management manually by applying the kueue.openshift.io/managed=true label to the project namespace.

$ oc label namespace <project_namespace> kueue.openshift.io/managed=true --overwrite

Prerequisites

Procedure

  1. In a terminal window, log in to the OpenShift CLI (oc) as shown in the following example:

    $ oc login <openshift_cluster_url> -u <admin_username> -p <password>
  2. Update the odh-dashboard-config custom resource in the OpenShift AI applications namespace. Replace <applications_namespace> with your OpenShift AI applications namespace. The default is redhat-ods-applications.

    $ oc patch odhdashboardconfig odh-dashboard-config \
      -n <applications_namespace> \
      --type merge \
      -p {"spec":{"dashboardConfig":{"disableKueue":false}}}

Verification

  1. From the OpenShift AI dashboard, create a new project.
  2. Verify that the project namespace is labeled for Kueue management:

    $ oc get ns <project_namespace> -o jsonpath='{.metadata.labels.kueue\.openshift\.io/managed}{"\n"}'

    The output should be true.

  3. Confirm that a LocalQueue exists for the project namespace:

    $ oc get localqueues -n <project_namespace>

    The LocalQueue might be created by the dashboard for new projects, by the Operator when autoCreateQueues is true, or by the cluster administrator when managing queues outside the Operator.

  4. Create a test workload, for example a Notebook, and verify that it includes the kueue.x-k8s.io/queue-name label.

You can manage ClusterQueue and LocalQueue resources outside the OpenShift AI Operator to enforce strict quota control in multitenant GPU environments. When autoCreateQueues is set to false in the DataScienceCluster resource, the Operator does not create queue resources, and you manage all queue resources by using GitOps tools, kubectl, or the Red Hat build of Kueue Operator directly.

Prerequisites

  • You have cluster administrator privileges for your OpenShift cluster.
  • You are using OpenShift 4.19 or later.
  • You have installed and configured the cert-manager Operator for Red Hat OpenShift for your cluster.
  • You have installed the Red Hat build of Kueue Operator on your cluster, as described in the Red Hat build of Kueue documentation.
  • You have activated the Kueue integration by setting kueue.managementState to Unmanaged in the DataScienceCluster resource, as described in Configure workload management with Kueue.
  • The autoCreateQueues field is set to false or is omitted in the DataScienceCluster resource. This is the default behavior.
  • You have installed the OpenShift CLI (oc) as described in the appropriate documentation for your cluster:

  • The jq command-line JSON processor is installed on your workstation. This tool is used in the verification steps.

Procedure

  1. In a terminal window, log in to the OpenShift CLI (oc) as shown in the following example:

    $ oc login <openshift_cluster_url> -u <admin_username> -p <password>
  2. Verify that autoCreateQueues is set to false or is not present in the DataScienceCluster resource:

    $ oc get datasciencecluster default-dsc -o jsonpath='{.spec.components.kueue}' | jq .

    The autoCreateQueues field is either absent or set to false. If the field is set to true, the Operator manages queue resources automatically and you do not need to create them manually.

  3. Create a ClusterQueue resource with quota definitions. The following example creates a cluster queue with CPU, memory, and GPU quotas:

    apiVersion: kueue.x-k8s.io/v1beta1
    kind: ClusterQueue
    metadata:
      name: <cluster_queue_name>
    spec:
      namespaceSelector: {}
      resourceGroups:
      - coveredResources: ["cpu", "memory", "nvidia.com/gpu"]
        flavors:
        - name: "<resource_flavor_name>"
          resources:
          - name: "cpu"
            nominalQuota: 9
          - name: "memory"
            nominalQuota: 36Gi
          - name: "nvidia.com/gpu"
            nominalQuota: 5

    where:

    <cluster_queue_name>
    Specifies the name of the cluster queue, for example team-gpu-cluster-queue.
    namespaceSelector: {}
    Specifies that all namespaces can submit workloads to this cluster queue. In multitenant environments, replace this with a label selector to restrict access to specific namespaces.
    <resource_flavor_name>
    Specifies the name of a ResourceFlavor you have already created. For ResourceFlavor configuration, see Configuring a resource flavor.
    nominalQuota

    Specifies the maximum amount of each resource that the cluster queue can allocate.

    Replace the example quota values with values appropriate for your cluster. If you use AMD GPUs, replace nvidia.com/gpu with amd.com/gpu in the example code.

    Apply the configuration:

    $ oc apply -f cluster_queue.yaml
  4. Create a LocalQueue resource in each project namespace that points to the cluster queue. The following example creates a local queue in a project namespace:

    apiVersion: kueue.x-k8s.io/v1beta1
    kind: LocalQueue
    metadata:
      name: <local_queue_name>
      namespace: <project_namespace>
    spec:
      clusterQueue: <cluster_queue_name>

    where:

    <local_queue_name>
    Specifies the name of the local queue, for example team-gpu-local-queue.
    <project_namespace>
    Specifies the namespace of the project that uses this queue.
    <cluster_queue_name>

    Specifies the name of the cluster queue you created in the previous step.

    Apply the configuration:

    $ oc apply -f local_queue.yaml

    Repeat this step for each project namespace that requires workload scheduling.

  5. Enable Kueue management for each project namespace by applying the kueue.openshift.io/managed=true label:

    $ oc label namespace <project_namespace> kueue.openshift.io/managed=true --overwrite

Verification

  1. Verify that the ClusterQueue resource was created and is active:

    $ oc get clusterqueues
  2. Verify that the LocalQueue resource exists in the target namespace:

    $ oc get localqueues -n <project_namespace>
  3. Verify that the local queue is ready to admit workloads:

    $ oc get localqueues -n <project_namespace> -o jsonpath='{.items[0].status.conditions}' | jq .
Note

When autoCreateQueues is false, the Operator does not create, modify, or reconcile any queue resources. Previously created queue resources remain on the cluster. Resources you create outside the Operator are not affected.

8.3. Troubleshooting reference: Kueue

If your users are experiencing errors in Red Hat OpenShift AI relating to Kueue workloads, read this section to understand what could be causing the problem, and how to resolve the problem.

If the problem is not documented here or in the release notes, contact Red Hat Support.

Problem

After the user runs the cluster.apply() command, the following error is shown:

ApiException: (500)
Reason: Internal Server Error
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Internal error occurred: failed calling webhook \"mraycluster.kb.io\": failed to call webhook: Post \"https://kueue-webhook-service.redhat-ods-applications.svc:443/mutate-ray-io-v1-raycluster?timeout=10s\": no endpoints available for service \"kueue-webhook-service\"","reason":"InternalError","details":{"causes":[{"message":"failed calling webhook \"mraycluster.kb.io\": failed to call webhook: Post \"https://kueue-webhook-service.redhat-ods-applications.svc:443/mutate-ray-io-v1-raycluster?timeout=10s\": no endpoints available for service \"kueue-webhook-service\""}]},"code":500}

Diagnosis

The Kueue pod might not be running.

Resolution

  1. In the OpenShift console, select the user’s project from the Project list.
  2. Click Workloads Pods.
  3. Verify that the Kueue pod is running. If necessary, restart the Kueue pod.
  4. Review the logs for the Kueue pod to verify that the webhook server is serving, as shown in the following example:

    {"level":"info","ts":"2024-06-24T14:36:24.255137871Z","logger":"controller-runtime.webhook","caller":"webhook/server.go:242","msg":"Serving webhook server","host":"","port":9443}

Problem

After the user runs the cluster.apply() command, the following error is shown:

Default Local Queue with kueue.x-k8s.io/default-queue: true annotation not found please create a default Local Queue or provide the local_queue name in Cluster Configuration.

Diagnosis

No default local queue is defined, and a local queue is not specified in the cluster configuration.

Resolution

  1. Check whether a local queue exists in the user’s project, as follows:

    1. In the OpenShift console, select the user’s project from the Project list.
    2. Click Home Search, and from the Resources list, select LocalQueue.
    3. If no local queues are found, create a local queue.
    4. Provide the user with the details of the local queues in their project, and advise them to add a local queue to their cluster configuration.
  2. Define a default local queue.

    For information about creating a local queue and defining a default local queue, see Configuring quota management for distributed workloads.

Problem

After the user runs the cluster.apply() command, the following error is shown:

local_queue provided does not exist or is not in this namespace. Please provide the correct local_queue name in Cluster Configuration.

Diagnosis

An incorrect value is specified for the local queue in the cluster configuration, or an incorrect default local queue is defined. The specified local queue either does not exist, or exists in a different namespace.

Resolution

  1. In the OpenShift console, select the user’s project from the Project list.

    1. Click Search, and from the Resources list, select LocalQueue.
    2. Resolve the problem in one of the following ways:

      • If no local queues are found, create a local queue.
      • If one or more local queues are found, provide the user with the details of the local queues in their project. Advise the user to ensure that they spelled the local queue name correctly in their cluster configuration, and that the namespace value in the cluster configuration matches their project name.
    3. Define a default local queue.

      For information about creating a local queue and defining a default local queue, see Configuring quota management for distributed workloads.

Problem

Kueue waits for a period of time before marking a workload as ready for all of the workload pods to become provisioned and running. By default, Kueue waits for 5 minutes. If the pod image is very large and is still being pulled after the 5-minute waiting period elapses, Kueue fails the workload and terminates the related pods.

Diagnosis

  1. In the OpenShift console, select the user’s project from the Project list.
  2. Click Workloads Pods.
  3. Click the user’s pod name to open the pod details page.
  4. Click the Events tab, and review the pod events to check whether the image pull completed successfully.

Resolution

If the pod takes more than 5 minutes to pull the image, resolve the problem in one of the following ways:

  • Add an OnFailure restart policy for resources that are managed by Kueue.
  • Configure a custom timeout for the waitForPodsReady property in the Kueue custom resource (CR). The CR is installed in the openshift-kueue-operator namespace by the Red Hat build of Kueue Operator.

For more information about this configuration option, see Enabling waitForPodsReady in the Kueue documentation.

Starting with OpenShift AI 2.24, the embedded Kueue component for managing distributed workloads is deprecated.

OpenShift AI now uses the Red Hat build of Kueue Operator to provide enhanced workload scheduling for distributed training, workbench, and model serving workloads.

Check if your environment is using the embedded Kueue component by verifying the spec.components.kueue.managementState field in the DataScienceCluster custom resource. If the field is set to Managed, you must migrate to the Red Hat build of Kueue Operator before upgrading OpenShift AI to avoid controller conflicts and ensure continued support for queue-based workloads.

OpenShift AI does not automatically migrate workloads, and you cannot install both the embedded Kueue and the Red Hat build of Kueue Operator on the same cluster.

Prerequisites

  • Your environment is currently using the embedded Kueue component. That is, the spec.components.kueue.managementState field in the DataScienceCluster custom resource is set to Managed.

    Note

    If spec.components.kueue.managementState is set to Removed or Unmanaged, skip this migration.

  • You have cluster administrator privileges for your OpenShift cluster.
  • You are using OpenShift 4.19 or later.
  • You have installed and configured the cert-manager Operator for Red Hat OpenShift for your cluster.

Procedure

  1. Optional: When you migrate from the embedded Kueue to Red Hat build of Kueue, the OpenShift AI Operator automatically moves your existing Kueue configuration from the kueue-manager-config ConfigMap to the Kueue custom resource (CR).

    If you want to keep the kueue-manager-config ConfigMap for reference, run the following command. Replace <applications_namespace> with your OpenShift AI applications namespace. The default namespace is redhat-ods-applications.

    $ oc annotate configmap kueue-manager-config -n <applications_namespace> opendatahub.io/managed=false
  2. Log in to the OpenShift web console as a cluster administrator.
  3. Uninstall the embedded Kueue component to avoid potential configuration conflicts.

    Note

    If you need to keep workloads running without interruption, you can skip this step. However, skipping it is not recommended because it might cause temporary configuration issues during the OpenShift AI upgrade.

    1. Go to the Installed Operators page. The navigation path depends on your OpenShift version:

      • On OpenShift 4.20 and later, click Ecosystem Installed Operators.
      • On OpenShift 4.19, click Operators Installed Operators.
    2. Click the Red Hat OpenShift AI Operator.
    3. Click the Data Science Cluster tab.
    4. Click the default-dsc object.
    5. Click the YAML tab.
    6. Set spec.components.kueue.managementState to Removed as shown:

      spec:
        components:
          kueue:
            managementState: Removed
    7. Click Save.
    8. Wait for the OpenShift AI Operator to reconcile, and then verify that the embedded Kueue was removed:

      • On the Details tab of the default-dsc object, check that the KueueReady condition has a Status of False and a Reason of Removed.
      • Go to Workloads Deployments, select the project where OpenShift AI is installed (for example, redhat-ods-applications), and confirm that Kueue-related deployments (for example, kueue-controller-manager) are no longer present.
  4. Install the Red Hat build of Kueue Operator on your OpenShift cluster:

    1. Follow the steps to install the Red Hat build of Kueue Operator, as described in the Red Hat build of Kueue documentation.
    2. Go to Ecosystem Installed Operators and confirm that the Red Hat build of Kueue Operator is listed with Status as Succeeded.
  5. Activate the Red Hat build of Kueue Operator in OpenShift AI:

    1. In the web console, go to the Installed Operators page. The navigation path depends on your OpenShift version:

      • On OpenShift 4.20 and later, click Ecosystem Installed Operators.
      • On OpenShift 4.19, click Operators Installed Operators.
    2. Click the Red Hat OpenShift AI Operator.
    3. Click the Data Science Cluster tab.
    4. Click the default-dsc object.
    5. Click the YAML tab.
    6. Set spec.components.kueue.managementState to Unmanaged and choose a queue management mode. The following examples show the available options.

      Note

      In OpenShift AI 3.5, autoCreateQueues defaults to false. If you want the Operator to create default queue resources after migrating from embedded Kueue, you must explicitly set autoCreateQueues to true.

      • To use Operator-managed queues with the predefined queue names, apply the following configuration:

        spec:
          components:
            kueue:
              managementState: Unmanaged
              autoCreateQueues: true
      • To use Operator-managed queues with custom queue names, apply the following configuration, replacing <example_cluster_queue> and <example_local_queue> with your custom values:

        spec:
          components:
            kueue:
              managementState: Unmanaged
              autoCreateQueues: true
              defaultClusterQueueName: <example_cluster_queue>
              defaultLocalQueueName: <example_local_queue>
      • To manage queue resources outside the Operator, set only managementState to Unmanaged and omit autoCreateQueues. For more information, see Manage ClusterQueues and LocalQueues outside the Operator.
    7. Click Save.
  6. Enable Kueue management for existing projects by applying the kueue.openshift.io/managed=true label to each project namespace:

    $ oc label namespace <project_namespace> kueue.openshift.io/managed=true --overwrite

    Replace <project_namespace> with the name of your project.

    Note

    Kueue validation and queue enforcement apply only to workloads in namespaces labeled with kueue.openshift.io/managed=true.

Verification

  1. Verify that the embedded Kueue component was removed by confirming that Kueue-related deployments are no longer present in the OpenShift AI applications namespace:

    $ oc get deployments -n <applications_namespace> | grep kueue

    The output should be empty, indicating that no Kueue-related deployments exist.

  2. Verify that the DataScienceCluster resource shows a healthy Unmanaged status for Kueue:

    $ oc get datasciencecluster default-dsc -o jsonpath='{.status.conditions[?(@.type=="KueueReady")]}{"\n"}'

    Confirm that the reason field shows Unmanaged.

  3. Verify that the Red Hat build of Kueue Operator pods are running:

    $ oc get pods -n openshift-kueue-operator

    If the Red Hat build of Kueue Operator was installed in a custom namespace, replace openshift-kueue-operator with your namespace.

  4. Verify that queue resources are available:

    $ oc get clusterqueues
    $ oc get localqueues --all-namespaces
  5. Verify that existing workloads in the queue continue to be processed by the Red Hat build of Kueue controllers by submitting a test workload and confirming that it is admitted.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top