Integrating the JobSet Operator
You can integrate JobSet Operator with Red Hat build of Kueue so you can leverage the scheduling and resource management functionality provided by Red Hat build of Kueue when running the JobSet Operator.
You can use the JobSet Operator to manage and run large-scale, coordinated workloads like high-performance computing (HPC) and AI training.
The JobSet Operator models a distributed batch workload as a group of Kubernetes Jobs. This allows you to easily specify different pod templates for different distinct groups of pods, for example, a leader, workers, parameter servers, and so on.
Installing JobSet Operator with Red Hat build of Kueue
You can configure Red Hat build of Kueue to work with the JobSet Operator.
Prerequisites
- You have installed Red Hat build of Kueue using the Red Hat Build of Kueue Operator in the software catalog.
- You have installed JobSet Operator in the software catalog.
- You have cluster administrator permissions and the
kueue-batch-admin-rolerole. - You have access to the OpenShift Container Platform web console.
- You have installed the cert-manager Operator for Red Hat OpenShift for your cluster.
Procedure
- Add
JobSetto theconfig.integrations.frameworkssection of the Red Hat build of Kueue cluster object, as shown in the following example:yamlapiVersion: kueue.openshift.io/v1 kind: Kueue metadata: name: cluster namespace: openshift-kueue-operator spec: managementState: Managed config: integrations: frameworks: - JobSet
Running JobSet Operator with Red Hat build of Kueue
You can add and run JobSet Operator to your existing frameworks.
Prerequisites
- Red Hat build of Kueue using the Red Hat Build of Kueue Operator is installed.
- JobSet Operator is installed.
- The cert-manager Operator for Red Hat OpenShift is installed.
- The
namespacewhereJobSetwill be created is labeled usingkueue.openshift.io/managed=true. - Ensure that the following objects have been configured:
ClusterQueueResourceFlavorLocalQueueNamespace
Procedure
- Create a file named
jobset.yaml.Example of a JobSetapiVersion: jobset.x-k8s.io/v1alpha2 kind: JobSet metadata: name: jobset namespace: my-namespace spec: replicatedJobs: - name: workers replicas: 1 template: spec: parallelism: 3 completions: 3 backoffLimit: 1 template: spec: containers: - name: sleep image: busybox resources: requests: cpu: 200m memory: "200Mi" command: - sleep args: - 220s - name: driver template: spec: parallelism: 1 completions: 1 backoffLimit: 0 template: spec: containers: - name: sleep image: busybox resources: requests: cpu: 200m memory: "200Mi" command: - sleep args: - 220s - Specify the target local queue in the
metadata.labelssection of theJobSetconfiguration.yamlmetadata: labels: kueue.x-k8s.io/queue-name: <local-queue-name> - Apply the JobSet configuration by running the following command:terminal
$ oc apply -f jobset.yaml