Setting up Kueue resources

In this section, you prepare your workshop environment so that you can use Kueue for distributing training with the Training Operator.

In the Distributing training jobs with the Training Operator section of this workshop, you implement a distributed training job by using Kueue for managing job resources. With Kueue, you can manage cluster resource quotas and how different workloads consume them.

If you are using the Red Hat Developer Sandbox, or if you do not intend to use Kueue to schedule your training jobs in the Distributing training jobs with the Training Operator section of this workshop, skip this section and continue to the next section, Creating a workbench and selecting a workbench image.
Procedure
  1. In the OpenShift AI dashboard, click the application launcher icon and then select the OpenShift Console option.

    OpenShift Console Link
  2. In the OpenShift console, click + in the top navigation bar.

    Add resources Icon
  3. Select your project from the list of projects.

    Select a project
  4. Verify that you selected the correct project.

    Selected project
  5. Copy the following code and paste it into the Import YAML editor.

    ---
    apiVersion: kueue.x-k8s.io/v1beta1
    kind: ResourceFlavor
    metadata:
      name: default-flavor
    ---
    apiVersion: kueue.x-k8s.io/v1beta1
    kind: ClusterQueue
    metadata:
      name: cluster-queue
    spec:
      namespaceSelector: {}
      resourceGroups:
      - coveredResources: ["cpu", "memory"]
        flavors:
        - name: "default-flavor"
          resources:
          - name: "cpu"
            nominalQuota: 4
          - name: "memory"
            nominalQuota: 8Gi
    ---
    apiVersion: kueue.x-k8s.io/v1beta1
    kind: LocalQueue
    metadata:
      name: local-queue
    spec:
      clusterQueue: cluster-queue
  6. Click Create.

Verification
  1. In the OpenShift console, you should see a "Resources successfully created" message and the following resources listed:

    • default-flavor

    • cluster-queue

    • local-queue