Quickstart
This page walks through a minimal JobSet demo to confirm that the operator is working and to introduce the most common fields of the JobSet custom resource.
TOC
PrerequisitesJobSet CR OverviewRun a Simple DemoInspect the ResourcesVerify CompletionClean UpNext StepsPrerequisites
- The JobSet Operator is installed and the controller pod in
jobset-systemisRunning. See Install JobSet. kubectlaccess to the target cluster.- A namespace to run the demo in. The examples below use the
defaultnamespace; replace it as needed.
JobSet CR Overview
The most commonly used fields in a JobSet CR are:
Run a Simple Demo
The example below defines a JobSet with two groups:
leader: one Job with one pod, simulating the driver process.workers: one Job with four parallel pods, simulating the workers.
The JobSet is marked successful as soon as both leader and workers complete.
Save the manifest as jobset-quickstart.yaml:
Apply it:
Inspect the Resources
Check that the JobSet has been accepted and child Jobs have been created:
Expected results:
- One Job named
jobset-quickstart-leader-0with one pod. - One Job named
jobset-quickstart-workers-0with four pods. - A headless Service named
jobset-quickstartfor stable DNS hostnames of the pods.
Tail logs from a pod, for example:
Verify Completion
After roughly 30 seconds, all pods complete. Confirm the JobSet status:
A successful JobSet reports a condition with type: Completed and status: "True". Child Jobs report COMPLETIONS reaching their configured value (1/1 for leader and 4/4 for workers).
Clean Up
Remove the demo resources:
Deleting the JobSet cascades to its child Jobs, pods, and the headless Service that was created for the workload.
Next Steps
For more advanced patterns, refer to the upstream examples and documentation:
- JobSet concepts: https://jobset.sigs.k8s.io/docs/concepts/
- Upstream examples: https://github.com/kubernetes-sigs/jobset/tree/main/examples
- Success and failure policies: configurable success criteria (
Any/All) and per-error-type failure handling. - Startup sequencing:
spec.startupPolicy.startupPolicyOrder: InOrderenforces a leader-before-workers startup order. - Exclusive placement: set
alpha.jobset.sigs.k8s.io/exclusive-topologyon the JobSet to colocate each child Job's pods inside a single topology domain. - Kueue integration: pair JobSet with Alauda Build of Kueue to manage queues and resource quotas for batch workloads.