Skip to content

Commit

Permalink
Keep an example simple for applying
Browse files Browse the repository at this point in the history
  • Loading branch information
stuton authored and Anton Stuchinskii committed Jul 3, 2023
1 parent f32b306 commit 2451a16
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions site/content/en/docs/tasks/run_jobsets.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: >
Run a Kueue scheduled JobSet.
---

This page shows how to leverage Kueue's scheduling and resource management capabilities when running [JobSet Operator](https://github.com/kubernetes-sigs/jobset) [JobSets](https://github.com/kubernetes-sigs/jobset/blob/main/docs/concepts/README.md).
This document explains how you can use Kueues scheduling and resource management functionality when running [JobSet Operator](https://github.com/kubernetes-sigs/jobset) [JobSets](https://github.com/kubernetes-sigs/jobset/blob/main/docs/concepts/README.md).

This guide is for [batch users](/docs/tasks#batch-user) that have a basic understanding of Kueue. For more information, see [Kueue's overview](/docs/overview).

Expand Down Expand Up @@ -42,7 +42,7 @@ metadata:

### b. Configure the resource needs

The resource needs of the workload can be configured in the `spec.replicatedJobs`.
The resource needs of the workload can be configured in the `spec.replicatedJobs`. The first [PriorityClassName](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass) of `spec.replicatedJobs` that is not empty will be used as the priority.

```yaml
- template:
Expand All @@ -64,12 +64,16 @@ The JobSet looks like the following:
apiVersion: jobset.x-k8s.io/v1alpha2
kind: JobSet
metadata:
name: sleep
generateName: sleep-job-
labels:
kueue.x-k8s.io/queue-name: user-queue
spec:
network:
enableDNSHostnames: false
subdomain: some-subdomain
replicatedJobs:
- name: workers
replicas: 2
template:
spec:
parallelism: 4
Expand Down Expand Up @@ -112,9 +116,6 @@ spec:
You can run this JobSet with the following commands:

```sh
# Create the JobSet (once)
kubectl apply -f jobset-sample.yaml
# To observe the queueing and admission of the jobs you can clone this example with different metadata.name and apply them.
kubectl apply -f jobset-job-sample-colone-1.yaml
kubectl apply -f jobset-job-sample-colone-2.yaml
# To monitor the queue and admission of the jobs, you can run this example multiple times:
kubectl create -f jobset-sample.yaml
```

0 comments on commit 2451a16

Please sign in to comment.