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:apiVersion: kueue.openshift.io/v1kind: Kueuemetadata:name: clusternamespace: openshift-kueue-operatorspec:managementState: Managedconfig:integrations:frameworks:- JobSet
Additional resources
- About the JobSet Operator
- Run A JobSet (Kubernetes documentation)
- Installing the cert-manager Operator for Red Hat OpenShift by using the web console
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/v1alpha2kind: JobSetmetadata:name: jobsetnamespace: my-namespacespec:replicatedJobs:- name: workersreplicas: 1template:spec:parallelism: 3completions: 3backoffLimit: 1template:spec:containers:- name: sleepimage: busyboxresources:requests:cpu: 200mmemory: "200Mi"command:- sleepargs:- 220s- name: drivertemplate:spec:parallelism: 1completions: 1backoffLimit: 0template:spec:containers:- name: sleepimage: busyboxresources:requests:cpu: 200mmemory: "200Mi"command:- sleepargs:- 220s - Specify the target local queue in the
metadata.labelssection of theJobSetconfiguration.metadata:labels:kueue.x-k8s.io/queue-name: <local-queue-name> - Apply the JobSet configuration by running the following command:
$ oc apply -f jobset.yaml
Additional resources