Running microservices on Kubernetes is a solved problem—until someone drops a batch training job into your cluster and everything falls apart. Traditional Kubernetes scheduling works great when pods stay running indefinitely, but batch workloads have different characteristics: they start, consume resources until completion, then terminate. That's where things get messy.
The Queueing Problem
Standard Kubernetes scheduling follows a straightforward model: Pod lands, scheduler checks if it fits on any node with available resources, and if yes, it gets scheduled immediately. This breaks down for batch jobs because there's no built-in mechanism to queue pending work, manage job priorities, or enforce fair resource sharing across teams. You end up with either over-provisioned clusters sitting idle or critical jobs getting starved out by less important ones. Kueue solves this by introducing a purpose-built admission control layer that intercepts workload submissions and manages them through organized queues. When a batch Job gets created, Kueue evaluates it against configured ClusterQueues and LocalQueues to determine placement order based on fairness policies and resource quotas rather than simple arrival time.
How Admission Control Works
The system integrates with Kubernetes' native scheduling framework through webhooks that intercept pod creation events before the default scheduler sees them. Kueue maintains its own internal state about which workloads can proceed, pausing jobs that would exceed cluster capacity and requeuing them when resources free up. This approach avoids modifying core Kubernetes components while still providing sophisticated batch-aware scheduling behavior.
Resource Flavors and Quota Management
Kueue supports heterogeneous compute environments through resource flavors—abstract representations of different node types in your cluster. Combined with ClusterQueues that define borrowing and lending relationships between teams, organizations can implement complex sharing policies without manual intervention. A team temporarily short on quota can borrow available capacity from other teams, then return those resources once their workload completes.
Key Takeaways
- Kueue adds batch-aware queuing to Kubernetes without forking the scheduler
- Workloads pause and requeue automatically based on cluster capacity
- Resource flavors enable multi-dimensional scheduling constraints
- Cross-team quota borrowing allows efficient resource utilization
The Bottom Line
If you're running ML training pipelines, scientific computations, or any bursty batch workloads on Kubernetes, Kueue is the missing piece you've been hacking around with custom operators and manual taints. It's mature, open-source, and handles the queuing complexity so you don't have to build it yourself.