// Module included in the following assemblies:
//
// * ai_workloads/kueue/integrating-jobset.adoc

:_mod-docs-content-type: PROCEDURE
[id="kueue-running-jobset_{context}"]
= Running {js-operator} with {kueue-name}

[role="_abstract"]
You can add and run {js-operator} to your existing frameworks.

.Prerequisites

* {kueue-name} using the {kueue-op} is installed.
* {js-operator} is installed.
* The {cert-manager-operator} is installed.
* The `namespace` where `JobSet` will be created is labeled using `kueue.openshift.io/managed=true`.
* Ensure that the following objects have been configured:
** `ClusterQueue`
** `ResourceFlavor`
** `LocalQueue`
** `Namespace`

.Procedure

. Create a file named `jobset.yaml`.
+
.Example of a `JobSet`
[source,yaml]
----
apiVersion: 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.labels` section of the `JobSet` configuration.
+
[source,yaml]
----
metadata:
  labels:
    kueue.x-k8s.io/queue-name: <local-queue-name>
----

. Apply the JobSet configuration by running the following command: 
+
[source,terminal]
----
$ oc apply -f jobset.yaml
----






