GPU quota and job queueing with Kueue

Kueue decides which batch and training workloads get GPUs and when, so teams share a scarce cluster fairly. This page covers the queue model, configuration choices, setup sequence and the limits to confirm before rollout.

On this page

What Kueue does for GPU quota and job queueing on Kubernetes

Several teams competing for a fixed GPU pool on self-managed Kubernetes face a specific problem: the default scheduler starts any pod that fits on a node, so the first team to submit a large batch of training jobs can occupy every GPU while others wait with no visible order. Kueue answers this by sitting between the user and the scheduler. It admits a workload only when the quota assigned to that team has room for the whole workload, and it holds everything else in a pending queue. The core objects are a ClusterQueue that defines the shared quota and a LocalQueue in each team's namespace that points to it, with ResourceFlavor objects describing the kinds of GPU nodes that count against that quota. Whether Kueue is the right tool depends on what you need to control. Plain namespace ResourceQuota objects cap usage but do not queue or borrow between teams, and they reject excess pods instead of waiting. Gang scheduling guarantees that a distributed job's pods start together, which is a placement concern, not a fairness one. Kueue addresses fairness and admission, and it is often used alongside gang-aware tooling rather than instead of it.

Before you commit to Kueue, confirm three things in your environment. First, list every team, the GPU types they use, and whether they need to borrow idle capacity from each other, since borrowing and preemption rules are set per ClusterQueue and drive most of the design work. Second, check which workload types you run: batch Job objects, Ray clusters and training operator jobs each need a supported integration, and you should verify the Kueue release you plan to run supports the exact versions of those operators in your cluster. Third, decide who may change quota. Quota is a platform decision with direct cost consequences, so the people who approve GPU budgets should own the ClusterQueue definitions, while team leads manage only their LocalQueue use. Ask any partner to show how they will test admission, borrowing and preemption on your node layout before quota goes live, and to document the rules so a new team can onboard without reading the controller source. Kueue also needs its own upgrade plan, because its API and integration behavior change between releases and it sits in the admission path for every GPU job.

How a batch job moves through Kueue to a GPU node

The walk starts when a user submits a batch Job to a LocalQueue in their namespace. Kueue creates a Workload object for that Job and checks it against the ClusterQueue quota, using the ResourceFlavor that describes which GPU nodes can satisfy it. Once the Workload is admitted, Kueue releases the Job's pods, and the kube-scheduler places them on nodes labeled for that flavor. Check the flavor node labels and the quota totals first, because a mismatch there leaves the Job pending even when the cluster has free GPUs.

Path from a batch Job through Kueue admission to scheduled GPU pods.

Which Kueue configuration fits which GPU pool

A single resource flavor fits a cluster where every GPU node is the same model, driver stack and memory size. Kueue then only has to count GPUs against one quota per queue, which keeps the configuration small and the failure modes easy to reason about. Most teams starting with Kueue begin here, because scheduling questions reduce to how many GPUs each team may hold.

  • Configuration load: one ResourceFlavor, one ClusterQueue and a LocalQueue per team, which is the smallest set of objects to review.
  • Quota math: nominal quota is a plain GPU count, so capacity planning is easy to explain to finance and to the teams.
  • Hardware drift: if nodes later differ in model or memory, the single flavor assumption breaks and jobs can land on hardware they cannot use.
  • Operating cost: lowest, since upgrades and node pool changes touch one flavor definition.
  • Illustrative example: a 16-node pool of identical eight-GPU servers serving three research groups needs one flavor and three LocalQueues.

Confirm with your platform team whether node pools are expected to diverge within the next hardware refresh, because retrofitting flavors later means touching every queue.

Setting up Kueue for GPU workloads in order

This sequence takes a shared GPU cluster from a bare Kubernetes install to a working queueing model, where each team submits jobs into its own queue and Kueue decides when they run. Each step ends with a check so the platform team knows the layer below is sound before building the next one.

  1. Confirm Kubernetes version and Kueue compatibility

    The platform engineer checks the Kubernetes minor version running on the control plane and compares it against the support matrix published for the Kueue release you plan to install. Confirm which Kubernetes versions that Kueue release supports, and confirm the same for any integrated components such as Ray or the training operators. Kubernetes maintains only the three most recent minor releases, so pick a Kueue release that matches a version you can keep patched through your upgrade plan. Check: the target Kueue release is listed as supported for your exact cluster version, and the decision is written down with the planned upgrade path.

  2. Label GPU nodes and define resource flavors

    The cluster administrator labels each GPU node pool with a stable key, such as the GPU model or node pool name, and taints nodes where only GPU work should run. The administrator then creates one ResourceFlavor per hardware type, with node labels and tolerations that match those labels, so Kueue knows where a workload can land. Keep the flavor list short and ordered by preference, because Kueue tries flavors in the order the ClusterQueue lists them. Check: a test pod with the flavor's selector schedules only onto the intended nodes, and the flavor objects apply without errors.

  3. Create cluster queues with nominal quotas

    The platform team creates one or more ClusterQueues that define how many GPUs and how much CPU and memory each flavor can provide to the cluster. Nominal quotas should reflect the capacity the business has agreed to allocate, and the team should decide whether unused quota can be borrowed across queues in the same cohort. Set the queueing strategy and preemption policy at this step, because they determine how waiting jobs are ordered and when running jobs can be evicted. Check: the ClusterQueue reports an active status, and the quota it shows matches the total GPUs on the labeled nodes.

  4. Create local queues for each team namespace

    For each team, the platform team creates a namespace and a LocalQueue that points to the appropriate ClusterQueue. Teams submit jobs to their LocalQueue by name, which keeps the team's work separate from others while sharing the cluster-wide quota. Access control matters here: restrict who can create workloads in each namespace with RBAC, so a team cannot submit to another team's queue. Check: a team member can submit a job to the LocalQueue, the LocalQueue shows as ready, and a user from another namespace is denied when they try the same submission.

  5. Enable integrations for batch jobs, Ray and training operators

    The platform engineer enables the Kueue integrations that match the workload types the teams will run, such as batch Jobs, Ray clusters and jobs, or the training operators in use. Each integration is turned on in the Kueue configuration, and the matching resources must be installed in the cluster at a version Kueue supports. Confirm the integrations match your workload types before enabling them, because each one adds controller behavior that needs its own tests. Check: a labeled job of each enabled type is held by Kueue until quota is available, then starts once it is admitted.

  6. Test admission and preemption with a sample job

    The platform team submits small sample jobs from two team namespaces that compete for the same flavor, one low priority and one high priority. They confirm that a job waits when quota is full, that admission follows the queueing strategy, and that a higher priority job triggers preemption only where the policy allows it. Record which running workloads are evicted and whether they are requeued correctly. Check: admission order, preemption events and final job states match the policy written in step three, and the results are saved as the baseline for future changes.

Integrating Kueue with batch Jobs, Ray and training operators

Kueue admits work by holding a workload until its quota is available, so each job type you run needs its own integration. The cards below cover the common integrations and the checks to make before you rely on them. Every integration depends on GPU nodes that advertise their devices correctly, so confirm the GPU stack first.

Batch Jobs suspended until admitted

Kueue's core integration with Kubernetes batch Jobs works by creating the Job in a suspended state and releasing it only once quota is granted. Set suspend: true on the Job template, point the Job at a LocalQueue through the queue label, and confirm the Job API version your cluster serves matches the Kueue release you install. Check that the Job controller respects suspension before you move any production training work onto the queue.

Ray clusters and RayJobs

KubeRay resources such as RayCluster and RayJob can be queued by Kueue, so the whole Ray head and worker group is admitted together rather than as scattered pods. Confirm which KubeRay CRD versions and Kueue release combination you run, and check that the queue label is set on the Ray resource, not only on its pods. Worker groups that request GPUs must reflect the quota you defined in the ClusterQueue.

Training operator jobs

Distributed training jobs such as PyTorchJob or TFJob created by the Kubeflow training operator are another integration point. Kueue needs the matching job kind enabled in its integration configuration, and each replica type (for example master and worker) must declare its GPU requests so the total is counted correctly. Confirm the training operator version and supported kinds in your Kueue release notes before you enable them.

How pods receive GPU requests

Kueue reads the resource requests on each pod, such as nvidia.com/gpu, and matches them against the resource flavors in a ClusterQueue. A flavor that selects GPU nodes by label must match the labels your device plugin and GPU Operator actually apply. Check the request names, limits and node selectors in a test Job, because a mismatch either blocks admission or admits work onto the wrong nodes.

GPU Operator and device plugin health first

Kueue can only count GPUs that the node reports as allocatable. Before you enable any integration, confirm that the NVIDIA GPU Operator components and the device plugin run on every GPU node, and that each node shows the expected GPU count in its allocatable resources. Driver or device plugin failures appear as jobs that wait indefinitely, so treat a healthy node inventory as a prerequisite for every test.

Confirm supported kinds and versions

Each integration is tied to specific API groups, CRD versions and Kueue releases, and these change between versions. Before you build, record the Kubernetes version, the Kueue release, the Ray or KubeRay version, and the training operator version, then check the Kueue integration list for each pair. Ask your DeployOpen team or your own platform engineers to write this matrix into the design document and to retest it during every upgrade.

Version skew policy

Questions teams ask before running Kueue on a GPU cluster

How much does a Kueue setup cost, and what drives the price?

Kueue itself is open source, so the cost is the work to design, install and operate it, plus the GPU capacity it schedules. The work is paid for as design time, configuration, integration and handover, and most of it is one-time. Recurring costs are upgrades, queue changes as teams grow, and monitoring. The main drivers are the number of GPU node pools (each becomes a resource flavor to model), the number of teams and cohorts needing quotas, how many workload types you integrate (batch Jobs, Ray, training operators), and how much identity and monitoring work sits around it. Ask any quote to itemize these components separately.

How long does a first Kueue setup take?

Duration depends on scope more than on Kueue's configuration syntax. A single cluster with one GPU pool, one team and plain batch Jobs is a much smaller job than several heterogeneous GPU pools, multiple teams with different quota rules, and Ray or training operator integration. Time also depends on whether GPU drivers and node labels are already in place, and on how quickly your team can agree on quota ownership and fair-sharing policy. Ask for a written timeline tied to a defined scope, with the decisions and approvals each phase depends on.

What does our team need to provide for the work?

Kueue work needs decisions and access from several people. Platform engineers provide cluster access and maintain the GPU node labels and taints that resource flavors reference. A capacity owner or finance lead decides how GPU quota is divided among teams. Team leads confirm priorities, borrowing rules and preemption tolerance for their jobs. Workload owners share representative job specs, including how they request GPUs and how long they run. Security or identity staff are needed if access is tied to SSO groups. Agreeing these owners early prevents rework on quota design.

Can our own platform team set up Kueue without a partner?

Yes, a capable platform team can install Kueue and run a simple configuration, especially with a small cluster and a single team. The harder parts are the decisions: how cohorts borrow from each other, when preemption is acceptable, how to handle mixed GPU types, and how queue quotas map to budgets. Teams often underestimate integration work with Ray, training operators and identity groups, and the ongoing effort of upgrading Kueue alongside Kubernetes. A useful test is whether your team can explain and test each quota and preemption rule before workloads depend on them.

How is Kueue different from gang scheduling?

Kueue is an admission controller: it decides when a workload is allowed to start based on queues, quotas and fair sharing, and then lets the normal scheduler place its pods. Gang scheduling addresses a different problem, making sure all pods of a distributed job start together so a training run does not deadlock with half its workers placed. The two can complement each other, but they are not interchangeable. If your main issue is teams competing for GPU quota, start with Kueue. If your main issue is partially scheduled multi-pod jobs, evaluate gang scheduling as well, and confirm which Kubernetes APIs your versions support.

How does Kueue differ from plain namespace quotas?

A Kubernetes ResourceQuota caps what a namespace can consume, but it rejects or blocks requests outright and does not queue them, order them, or let a team borrow idle capacity from another team. Kueue holds jobs in queues until quota is available, supports cohorts where unused quota can be lent, and can apply fair sharing and preemption rules across teams. Namespace quotas remain useful as a hard ceiling and for multi-tenant isolation. Many clusters use both: namespaces for ownership and access control, Kueue for scheduling fairness across GPU capacity.

What breaks most often in a Kueue deployment, and what should we check?

The most common failures come from mismatches between Kueue objects and the cluster. Resource flavors that do not match real node labels or taints leave jobs pending with no obvious error. Quotas that do not account for GPU resource names exposed by the device plugin cause jobs to never admit. Preemption rules that are not tested can evict long training runs without warning. Verify your flavor labels against node labels, confirm GPU resource names on a test job, run a deliberate over-quota scenario, and check that queued workloads and preempted workloads produce the events and logs your operators expect before go-live.

Does Kueue meet our compliance requirements for shared GPU access?

Kueue does not provide compliance on its own. It can enforce fair sharing and quotas, but auditability depends on how the surrounding cluster is configured, including RBAC for who can submit to each queue, audit logging of API actions, and identity integration. Your assessors will expect evidence that these controls exist and operate. DeployOpen prepares systems, controls and evidence for compliance assessments, but independent auditors and certification bodies issue any audit reports or attestations. Ask which controls your framework requires before the design is fixed.

How DeployOpen scopes and delivers a Kueue queueing setup

DeployOpen works from a written, fixed scope agreed before any cluster change is made. For a Kueue setup, that scope names the queue design (ClusterQueues, LocalQueues per team or namespace, and the cohorts that let teams borrow idle quota), the ResourceFlavors that map GPU node pools to flavor labels and taints, the admission checks and preemption policy, and the integrations with batch Jobs, Ray and the training operators your teams use. It also states the test cases used to prove fair sharing and preemption behave as agreed, and the handover package: manifests in your Git repository, runbooks for adding a team or a new GPU pool, and a record of what was tested and how. Most engagements are fixed-scope, so the quote follows from that written document rather than from an open-ended estimate.

The scope should also decide who owns each decision after handover. Your platform team will need to confirm which quota numbers come from budgets and which come from capacity planning, how GPU node labels are kept in sync with the NVIDIA GPU Operator, and whether queue changes go through GitOps or manual administration. DeployOpen can help define these ownership lines and prepare the documentation, but your team should confirm the Kueue release and Kubernetes version it will support, using the upstream Kubernetes releases page as the starting point for the version calendar. Ask any prospective partner to show how a queue change is proposed, tested and rolled back in a non-production cluster before it reaches shared GPU capacity.

Ongoing work is available as optional retainers. Retainers can cover Kueue and Kubernetes upgrades, periodic review of queue usage and quota settings, and continuous checks that RBAC, admission rules and workload isolation still match the written design. These are priced and scoped separately from the initial build. Before signing, ask for the exact list of recurring activities, who performs them, how changes are reported, and what happens when an upgrade changes queue behavior. A clear written scope, with named handover artifacts and a defined retainer boundary, is what makes the difference between a queue that stays fair after go-live and one that drifts.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.