Skip to main content
Using a coding agent? Load the together-kueue skill to teach your agent to write correct Kueue and GPU cluster code for Together AI. Learn more.
Running third-party schedulers on Together GPU clusters is in beta. The steps and pinned version here (Kueue v0.18.3) are validated on current clusters, but the workflow and defaults may change. Report issues to support@together.ai.
Kueue is a Kubernetes-native job queueing controller. Instead of letting every job compete for GPUs the moment it is created, Kueue holds jobs in a queue and admits them only when their quota is available, suspending the rest. This is how you share a fixed GPU pool across teams without overcommitting it. This guide installs Kueue on a Together GPU cluster and gates jobs on GPU quota. For the concepts behind each object below, see the Kueue documentation.

Prerequisites

  • A Together Kubernetes GPU cluster in the Ready state.
  • kubectl configured against the cluster. Download credentials with tg beta clusters get-credentials <cluster_id> --set-default-context.
  • Cluster-admin access. The kubeconfig from the Together CLI grants it.

Install Kueue

Apply the versioned release manifest. Use --server-side because the bundled custom resource definitions are large. For other install methods and configuration options, see the Kueue installation guide:
Wait for the controller to become available:
Prefer Helm? Install the chart from the registry: helm install kueue oci://registry.k8s.io/kueue/charts/kueue --version 0.18.3 --namespace kueue-system --create-namespace.

Define quotas

Kueue admits jobs against quota described by three resources:
  • ResourceFlavor: a class of nodes. One flavor is enough when your GPU nodes are homogeneous.
  • ClusterQueue: the cluster-wide quota pool. It must cover every resource your jobs request, including CPU and memory, or matching jobs are never admitted.
  • LocalQueue: a namespaced pointer to a ClusterQueue that users submit jobs to.
Create all three, budgeting eight GPUs:
kueue-quota.yaml
nominalQuota is the amount of each resource the ClusterQueue can admit at once. Set the GPU quota to the number of GPUs you want this queue to control.

Attach shared storage

Together provisions a static PersistentVolume named after your cluster’s shared volume. Bind a PersistentVolumeClaim to it so queued jobs read and write the same dataset and checkpoints:
shared-pvc.yaml
Storage is not a quota resource, so it does not affect admission. The next section mounts this claim into the job.

Submit a job to a queue

Point a standard batch/v1 Job at the LocalQueue with the kueue.x-k8s.io/queue-name label and set suspend: true. Kueue takes over the suspend flag and flips it to false when it admits the job. For other supported workload types (JobSet, RayJob, MPIJob, and more), see running jobs with Kueue:
gpu-job.yaml
Kueue creates a Workload object for the job and admits it because six GPUs fit within the eight-GPU quota. The job’s suspend flag flips to false and its pod starts:

Watch quota gate a second job

Submit a second job that also requests six GPUs. Together the two jobs need 12 GPUs, past the eight-GPU quota. Copy gpu-job.yaml to a new name (gpu-job-b) and apply it, then compare the two:
The first job runs; the second stays suspended. Its Workload reports exactly why:
When the first job finishes or you delete it, Kueue re-admits the queued job automatically and its pod starts, no resubmission needed:

Troubleshooting

  • A job never leaves suspend: true: its combined request exceeds the ClusterQueue quota, or the ClusterQueue does not cover one of its resources. Check the Workload’s QuotaReserved condition message.
  • The job runs immediately without queueing: the kueue.x-k8s.io/queue-name label is missing or names a LocalQueue that does not exist in the job’s namespace.
  • The ClusterQueue shows no active quota: its ResourceFlavor is missing or misnamed. The flavors[].name must match a ResourceFlavor.
  • A job requesting only GPUs is never admitted: the ClusterQueue must also cover the CPU and memory the pods request. Add them to coveredResources.

Next steps

Gang-schedule GPU jobs with Volcano

Run distributed training with all-or-nothing gang scheduling.

Manage GPU clusters

Deploy workloads, attach storage, and access the Kubernetes dashboard.