<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/gpu-scheduling-and-bin-packing-in-kubernetes-pack-more-ai-onto-every-gpu-6nuaafnff" -->

---
title: GPU Scheduling and Bin-Packing in Kubernetes: Pack More...
description: Default Kubernetes GPU scheduling averages just 5% GPU utilization across production clusters due to LeastAllocated spreading and opaque integer allocation....
canonical: https://daily.dev/posts/gpu-scheduling-and-bin-packing-in-kubernetes-pack-more-ai-onto-every-gpu-6nuaafnff
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: GPU Scheduling and Bin-Packing in Kubernetes: Pack More AI onto Every GPU | daily.dev
og:description: Default Kubernetes GPU scheduling averages just 5% GPU utilization across production clusters due to LeastAllocated spreading and opaque integer allocation....
og:url: https://daily.dev/posts/gpu-scheduling-and-bin-packing-in-kubernetes-pack-more-ai-onto-every-gpu-6nuaafnff
og:image: https://api.daily.dev/og/posts/6NUaafNFF.png
og:image:alt: GPU Scheduling and Bin-Packing in Kubernetes: Pack More AI onto Every GPU
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# GPU Scheduling and Bin-Packing in Kubernetes: Pack More AI onto Every GPU

**[Cast AI](https://daily.dev/sources/castai)** · 13 min read · 0 upvotes · 0 comments

## Summary

Default Kubernetes GPU scheduling averages just 5% GPU utilization across production clusters due to LeastAllocated spreading and opaque integer allocation. This guide covers three technical layers to improve density: switching scheduler scoring to MostAllocated with GPU-weighted resources, enabling GPU sharing via MIG (hardware-isolated partitions on A100/H100) or time-slicing (up to 48 virtual replicas via CUDA context switching), and running continuous consolidation with PodDisruptionBudgets and cold-start awareness. Dynamic Resource Allocation (DRA), stable in Kubernetes 1.34, replaces integer counting with CEL-based attribute filtering and cross-pod device sharing. Concrete YAML examples, DCGM metrics for monitoring, MIG profile breakdowns, and a comparison table between default, GPU-aware, and DRA scheduling approaches are included. The best-measured cluster achieved 49% utilization versus the 5% fleet average, with cost savings up to 90% when combining MIG/time-slicing with Spot instances.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://cast.ai/blog/kubernetes-gpu-scheduling-bin-packing>

## Questions this post answers

### What is Dynamic Resource Allocation (DRA) in Kubernetes and when did it become stable?

Dynamic Resource Allocation is a Kubernetes API in the resource.k8s.io/v1 group that replaces the device plugin's integer counting model with attribute-based device selection using CEL expressions. Pods use ResourceClaims to request devices by attribute, such as GPU architecture or minimum memory, rather than a bare count. DRA reached GA in Kubernetes 1.34 and is enabled by default starting in Kubernetes 1.35; AWS EKS supports it from Kubernetes 1.33.

_Track Kubernetes scheduling changes like DRA on daily.dev before they affect your GPU cluster upgrade plans._

### How do I switch the Kubernetes scheduler from LeastAllocated to MostAllocated for GPU bin-packing?

Configure the NodeResourcesFit plugin in the KubeSchedulerConfiguration with scoringStrategy type set to MostAllocated, and assign weights to cpu, memory, and nvidia.com/gpu resources, giving the GPU resource a higher weight such as 3. This makes the scheduler prefer nodes already running dense GPU workloads instead of spreading pods across the emptiest nodes, which is the default LeastAllocated behavior.

_Developers tuning Kubernetes GPU scheduling configs can follow implementation guides like this on daily.dev._

### What is the difference between MIG and time-slicing for sharing an NVIDIA GPU in Kubernetes?

MIG (Multi-Instance GPU) partitions a physical GPU into up to 7 hardware-isolated instances with dedicated compute, memory bandwidth, and L2 cache, giving strict fault and memory isolation, and works on A100, A30, H100, and H200. Time-slicing creates up to 48 virtual replicas via CUDA context switching on any CUDA-capable GPU but has no memory enforcement, so co-tenants can OOM each other; MIG is recommended when memory isolation is required in production.

_Comparing GPU sharing strategies like MIG versus time-slicing gets easier with technical breakdowns on daily.dev._

## Similar posts on daily.dev

- [Kubernetes GPU Optimization: How to Cut GPU Waste Without Slowing Workloads](https://daily.dev/posts/kubernetes-gpu-optimization-how-to-cut-gpu-waste-without-slowing-workloads-pi9fl1mnv) · Cast AI · 0 upvotes · 0 comments
- [Kubernetes: Get the Most from Dynamic Resource Allocation](https://daily.dev/posts/kubernetes-get-the-most-from-dynamic-resource-allocation-hx4khv57l) · The New Stack · 2 upvotes · 0 comments
- [GPU Resource Management for Kubernetes Workloads: From Monolithic Allocation to Intelligent Sharing](https://daily.dev/posts/gpu-resource-management-for-kubernetes-workloads-from-monolithic-allocation-to-intelligent-sharing-hxv9krzms) · Container Journal · 0 upvotes · 0 comments

---

Tags: [#kubernetes](https://daily.dev/tags/kubernetes), [#gpu](https://daily.dev/tags/gpu)

[View this post on daily.dev](https://daily.dev/posts/gpu-scheduling-and-bin-packing-in-kubernetes-pack-more-ai-onto-every-gpu-6nuaafnff)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"GPU Scheduling and Bin-Packing in Kubernetes: Pack More AI onto Every GPU","url":"https://daily.dev/posts/gpu-scheduling-and-bin-packing-in-kubernetes-pack-more-ai-onto-every-gpu-6nuaafnff","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/gpu-scheduling-and-bin-packing-in-kubernetes-pack-more-ai-onto-every-gpu-6nuaafnff"},"datePublished":"2026-07-17T10:44:24.355Z","dateModified":"2026-09-14T08:02:44.829Z","description":"Default Kubernetes GPU scheduling averages just 5% GPU utilization across production clusters due to LeastAllocated spreading and opaque integer allocation....","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/306ccd9ad10546237040e084fdaf69de?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/306ccd9ad10546237040e084fdaf69de?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Cast AI","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Cast AI","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/e5868702aaf84d8293e56794e2c6629c","url":"https://daily.dev/sources/castai"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/gpu-scheduling-and-bin-packing-in-kubernetes-pack-more-ai-onto-every-gpu-6nuaafnff","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"kubernetes,gpu","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Cast AI","item":"https://daily.dev/sources/castai"},{"@type":"ListItem","position":3,"name":"GPU Scheduling and Bin-Packing in Kubernetes: Pack More AI onto Every GPU"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/gpu-scheduling-and-bin-packing-in-kubernetes-pack-more-ai-onto-every-gpu-6nuaafnff#faq","mainEntity":[{"@type":"Question","name":"What is Dynamic Resource Allocation (DRA) in Kubernetes and when did it become stable?","acceptedAnswer":{"@type":"Answer","text":"Dynamic Resource Allocation is a Kubernetes API in the resource.k8s.io/v1 group that replaces the device plugin's integer counting model with attribute-based device selection using CEL expressions. Pods use ResourceClaims to request devices by attribute, such as GPU architecture or minimum memory, rather than a bare count. DRA reached GA in Kubernetes 1.34 and is enabled by default starting in Kubernetes 1.35; AWS EKS supports it from Kubernetes 1.33. Track Kubernetes scheduling changes like DRA on daily.dev before they affect your GPU cluster upgrade plans."}},{"@type":"Question","name":"How do I switch the Kubernetes scheduler from LeastAllocated to MostAllocated for GPU bin-packing?","acceptedAnswer":{"@type":"Answer","text":"Configure the NodeResourcesFit plugin in the KubeSchedulerConfiguration with scoringStrategy type set to MostAllocated, and assign weights to cpu, memory, and nvidia.com/gpu resources, giving the GPU resource a higher weight such as 3. This makes the scheduler prefer nodes already running dense GPU workloads instead of spreading pods across the emptiest nodes, which is the default LeastAllocated behavior. Developers tuning Kubernetes GPU scheduling configs can follow implementation guides like this on daily.dev."}},{"@type":"Question","name":"What is the difference between MIG and time-slicing for sharing an NVIDIA GPU in Kubernetes?","acceptedAnswer":{"@type":"Answer","text":"MIG (Multi-Instance GPU) partitions a physical GPU into up to 7 hardware-isolated instances with dedicated compute, memory bandwidth, and L2 cache, giving strict fault and memory isolation, and works on A100, A30, H100, and H200. Time-slicing creates up to 48 virtual replicas via CUDA context switching on any CUDA-capable GPU but has no memory enforcement, so co-tenants can OOM each other; MIG is recommended when memory isolation is required in production. Comparing GPU sharing strategies like MIG versus time-slicing gets easier with technical breakdowns on daily.dev."}}]}
```

