惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
The GitHub Blog
The GitHub Blog
美团技术团队
Know Your Adversary
Know Your Adversary
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The Register - Security
The Register - Security
Stack Overflow Blog
Stack Overflow Blog
Attack and Defense Labs
Attack and Defense Labs
G
Google Developers Blog
I
InfoQ
博客园 - 司徒正美
T
Troy Hunt's Blog
Google DeepMind News
Google DeepMind News
J
Java Code Geeks
MongoDB | Blog
MongoDB | Blog
博客园 - 聂微东
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
S
Security Affairs
M
MIT News - Artificial intelligence
Simon Willison's Weblog
Simon Willison's Weblog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Tailwind CSS Blog
量子位
Vercel News
Vercel News
月光博客
月光博客
V
Vulnerabilities – Threatpost
N
News and Events Feed by Topic
Hugging Face - Blog
Hugging Face - Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
L
LangChain Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
L
LINUX DO - 最新话题
F
Full Disclosure
The Hacker News
The Hacker News
Hacker News: Ask HN
Hacker News: Ask HN
T
Tor Project blog
A
Arctic Wolf
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Forbes - Security
Forbes - Security
IT之家
IT之家
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Y
Y Combinator Blog
GbyAI
GbyAI
B
Blog RSS Feed
V
Visual Studio Blog
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs

Sealos Blog

Build a Full-Stack App with Claude Code + InsForge — Zero Backend Code | Sealos Blog InsForge vs Supabase: Which Backend for AI-Powered Development? | Sealos Blog Kubernetes NodePort Exhaustion: SSH Gateway Solution | Sealos Blog Claude Code Metrics Dashboard: Grafana Setup (2026) | Sealos Blog What Is RustFS? Apache 2.0 MinIO Alternative (2026) | Sealos Blog Claude Code Mobile: iPhone, Android & SSH (2026) | Sealos Blog Eaglercraft Server Hosting: Fast Setup (2026) | Sealos Blog An Honest Review: Migrating a Complex Microservice App from Heroku to Sealos | Sealos Blog The Ultimate Guide to Kubernetes Audit Logging for Security and Compliance | Sealos Blog Cost Optimization Shootout: Sealos Autonomous FinOps vs. Kubecost Manual Reports | Sealos Blog For CTOs: How to Cut Your Cloud Bill by 50% Without Sacrificing Performance | Sealos Blog Building Resilient Systems: A Deep Dive into Sealos High-Availability and Auto-Failover | Sealos Blog Building a Scalable Event-Driven Architecture with Sealos Managed Kafka | Sealos Blog Beyond kubectl apply: 5 GitOps Best Practices for Production-Ready CI/CD on Sealos | Sealos Blog Advanced RAG Pipelines: Why Your Choice of Vector Database (like Milvus) Matters | Sealos Blog Advanced MLOps: How to Monitor and Evaluate LLM Applications in Production | Sealos Blog A Developer's Guide to Kubernetes RBAC: Securing Your Cluster the Easy Way with Sealos | Sealos Blog A CISO's Guide to Cloud Development: Securing the CI/CD Pipeline with Sealos DevBox | Sealos Blog What is Kubernetes Multi-Tenancy? A Guide for Platform Engineers | Sealos Blog What is Infrastructure from Code (IfC)? The Next Step After Infrastructure as Code (IaC) | Sealos Blog What is GitOps? A Beginner's Guide to "Push-to-Deploy" Workflows | Sealos Blog What is eBPF? The Future of Kubernetes Networking and Security | Sealos Blog What is an "AI-Native" Platform? (And Why You Need One for MLOps) | Sealos Blog What is an Agentic Workflow? Building the Next Generation of AI Apps | Sealos Blog What is a Kubernetes Chargeback Model (And How Does it Save You Money?) | Sealos Blog What is a "Headless" Development Environment? (And How it Works with VS Code) | Sealos Blog What is a Graph-Based Vector Database? (And When to Use It Over Milvus) | Sealos Blog What is a "Cloud Operating System"? The Next Evolution of PaaS Explained | Sealos Blog The Real Cost of EKS: How Sealos Delivers a Simpler, Cheaper Kubernetes Experience | Sealos Blog The 3 Types of Kubernetes Autoscaling (HPA, VPA, CA) and How Sealos Manages Them for You | Sealos Blog Sealos vs Vercel: Why a Cloud OS Beats a Frontend Platform for Full-Stack Apps | Sealos Blog Sealos vs. Render vs. Fly.io: A 2025 Guide to the Best Heroku Alternatives | Sealos Blog Sealos vs. OpenShift: Kubernetes for Developers vs. Kubernetes for Ops Teams | Sealos Blog Sealos vs. Netlify: When to Choose a Full Kubernetes Platform over a Static Site Hoster | Sealos Blog Sealos vs. DigitalOcean App Platform: A Head-to-Head Comparison on Cost, Features, and Scalability | Sealos Blog Sealos vs. AWS Elastic Beanstalk: The Modern PaaS for Developers Who Hate YAML | Sealos Blog Sealos DevBox vs. AWS Cloud9: Why Your CDE Should Be Platform-Agnostic | Sealos Blog For Developers: Stop Wasting Time on DevOps. A 10-Minute Guide to Shipping Faster with DevBox. | Sealos Blog Deploying n8n with Docker: From Local Setups to a Radically Simple Cloud Alternative | Sealos Blog The Impact of Prompt Bloat: How the Sealos AI Proxy Can Cache Queries and Cut LLM Costs | Sealos Blog The FinOps Playbook: How to Implement Kubernetes Chargebacks and Showbacks with Sealos | Sealos Blog Smoke Testing for ML Pipelines: Catching Data and Model Errors Before They Hit Production | Sealos Blog Optimizing PostgreSQL Performance: A Guide to Sealos Managed Database Tuning | Sealos Blog Managing Kubernetes Multi-Tenancy: How Sealos Enforces Resource Quotas and Network Policies | Sealos Blog From Days to Minutes: How to Standardize Developer Environments for Your Entire Engineering Org | Sealos Blog For Platform Engineers: How to Build a Golden Path IDP (Internal Developer Platform) with Sealos | Sealos Blog For FinOps Managers: The 5 Leakiest Buckets in Your Kubernetes Budget (And How to Plug Them) | Sealos Blog For Educators & IT Admins: How to Provide a Secure, Scalable Cloud Lab for 1000+ Students on a Budget | Sealos Blog What is a Vector Database? A Beginner's Guide to Milvus, Pinecone, and More | Sealos Blog Why Your Microservices Architecture is Failing (And How a Cloud OS Can Fix It) | Sealos Blog The Power of Autoscaling: A Deep Dive into HPA, VPA, and Cluster Autoscaler | Sealos Blog The Total Economic Impact of Cloud Development Environments (CDEs) | Sealos Blog The Illustrated Guide to the Kubernetes Control Plane | Sealos Blog The MLOps Lifecycle Explained: From Data Prep to Model Deployment | Sealos Blog Beyond Vercel's AI Cloud: The Case for an AI-Native Operating System | Sealos Blog The Architecture of a Modern AI Application: A 2025 Blueprint | Sealos Blog GitHub Codespaces is Great, But Your Workflow is Incomplete. Here's Why. | Sealos Blog The Best Heroku Alternatives in 2025 for Scalability and Cost | Sealos Blog CAST AI vs. Kubecost vs. Sealos: Choosing the Right K8s Cost Management Tool | Sealos Blog DevBox vs. Gitpod vs. Replit: An Unbiased Comparison for 2025 | Sealos Blog Unlocking Hidden Savings: A Guide to Using Spot Instances Safely in Kubernetes | Sealos Blog Can a CDE Really Replace Your MacBook Pro? A Performance Benchmark | Sealos Blog The End of "Works on My Machine": Achieving 100% Reproducible Builds with DevBox | Sealos Blog Rightsizing Kubernetes Workloads: How to Stop Wasting Money on CPU and Memory Requests | Sealos Blog The 2025 Guide to Kubernetes Cost Optimization: 10 Strategies to Cut Your Bill in Half | Sealos Blog FinOps for Startups: How to Build a Cost-Conscious Culture from Day One | Sealos Blog How to Onboard a New Developer in Under 5 Minutes with Sealos DevBox | Sealos Blog Calculating Kubernetes Costs: A Breakdown of EKS, GKE, and AKS Pricing Models | Sealos Blog Case Study: How We Reduced Our Kubernetes Bill by 87% with Sealos | Sealos Blog Are You Overpaying for Managed Kubernetes? The True Cost of Vendor Lock-in | Sealos Blog Beyond Monitoring: How Sealos Autonomously Optimizes Your Cloud Spend | Sealos Blog A Practical Guide to Kubernetes Security: Hardening Your Cluster in 2025 | Sealos Blog A Secure-by-Design Development Workflow with Isolated Cloud Environments | Sealos Blog Setting Up a Collaborative Python Data Science Environment with DevBox | Sealos Blog Using the Sealos AI Proxy to Manage and Cache LLM API Calls | Sealos Blog Migration Guide: Moving Your Node.js & Postgres App from Heroku to Sealos in Under an Hour | Sealos Blog Serving Machine Learning Models at Scale: A Guide to Inference Optimization | Sealos Blog Headless Development with Sealos: Using Your Local VS Code with a Powerful Cloud Backend | Sealos Blog How to Build and Deploy a RAG Pipeline with Llama 3 and Milvus on Sealos | Sealos Blog From Localhost to Production in 15 Minutes: A Full-Stack CDE Workflow with Sealos DevBox | Sealos Blog GitOps on Autopilot: Implementing a CI/CD Pipeline with Sealos and GitHub Actions | Sealos Blog Fine-Tuning Open-Source LLMs on a Budget with Sealos | Sealos Blog From Docker Compose to Kubernetes: A Simple Migration Path with Sealos | Sealos Blog Building an AI Agentic Workflow with LangChain and Sealos | Sealos Blog What is Helm for Kubernetes? The Ultimate Package Manager Explained | Sealos Blog What is a Custom Resource Definition (CRD) in Kubernetes? | Sealos Blog What is a Kubernetes StatefulSet? A Practical Guide | Sealos Blog What is a Kubernetes Ingress Controller? A Guide to Smart Traffic Routing | Sealos Blog What is a Kubernetes Operator? Automating Complex Applications | Sealos Blog What is a Kubernetes Service? A Simple Guide for Developers | Sealos Blog Streamlining Your CI/CD Pipeline with a DevBox Build Environment | Sealos Blog Why Standardized Development Environments Are Key to Team Velocity | Sealos Blog What Is GitHub Codespace? | Sealos Blog DevBox Install? Skip It Entirely. Get a Ready-to-Code Environment in One Click with Sealos DevBox. | Sealos Blog How to Set Up a DevBox: The Ultimate Guide to 1-Click Cloud Development | Sealos Blog Empowering Indie Devs and Startup Teams: How Sealos DevBox Accelerates Agile Development | Sealos Blog From Chaos to Consistency: How Sealos DevBox Transforms Enterprise Development Workflows | Sealos Blog From Campus Labs to Cloud Freedom: How Sealos DevBox Supercharges Student Development | Sealos Blog How Sealos DevBox Cut Container Commit Time from 15 Minutes to 1 Second | Sealos Blog DevBox vs Codespaces: Which Remote Dev Environment Fits You Best? | Sealos Blog
The Ultimate Guide to GPU Provisioning and Management in Kubernetes | Sealos Blog
Sealos · 2025-09-12 · via Sealos Blog

GPUs have become the backbone of modern AI, high-performance data analytics, and scientific computing. But running GPU-intensive workloads at scale is not just about getting a powerful card—it's about orchestrating resources efficiently, ensuring isolation and fairness, and automating lifecycle operations. Kubernetes, with its extensible scheduling and robust ecosystem, has emerged as the platform of choice for GPU workloads. The challenge is knowing how to provision GPU resources, configure the stack correctly, and manage performance, cost, and reliability.

This guide is your end-to-end handbook for GPU provisioning and management in Kubernetes. Whether you’re deploying your first GPU node or running multi-tenant GPU clusters for MLOps, you’ll find actionable practices, example manifests, and operational tips to help you succeed.


Kubernetes treats GPUs as “extended resources” provided by a device plugin. Unlike CPU and memory, GPUs are not first-class schedulable resources built into the core Kube scheduler; they are discovered and advertised via plugins, and consumed by pods as resource limits.

Key concepts:

  • Extended resources: Devices exposed to Kubernetes by a device plugin (for NVIDIA: nvidia.com/gpu).
  • Device plugin: A DaemonSet that advertises devices to the kubelet on each node and handles device assignment to pods.
  • Runtime support: Containers must run with a runtime supporting GPU (e.g., NVIDIA Container Toolkit).
  • Drivers and libraries: Node-level NVIDIA driver; in-container CUDA libraries and user-space tooling.

Why it matters:

  • Separation of concerns: K8s schedules GPUs without bundling GPU vendor logic.
  • Flexibility: Support for features like multi-instance GPU (MIG) or time-slicing via plugins.
  • Compatibility: Consistency across cloud and on-prem environments.

  • Unified Platform: Run training, inference, ETL, and batch jobs within one orchestrated platform.
  • Automation: Autoscaling, rolling upgrades, job queues, and CI/CD integrate with GPU workloads.
  • Cost Efficiency: Bin-packing, sharing strategies (time-slicing/MIG), and quotas reduce waste.
  • Multi-tenancy: Namespaces, quotas, and policies ensure fair and secure sharing across teams.
  • Portability: Hybrid and multi-cloud GPU deployments with the same stack.

Platforms like Sealos (sealos.io) build on Kubernetes to provide a cloud operating system experience, with app marketplaces and multi-tenant isolation that simplify GPU cluster setup, operator installation, and project-level governance. If you are building a self-service AI platform, Sealos can be a strong fit.


NVIDIA Device Plugin in a Nutshell

  • The NVIDIA device plugin runs as a DaemonSet.
  • It registers GPUs with the kubelet as extended resources, typically nvidia.com/gpu.
  • Pods request GPUs by setting resource limits on nvidia.com/gpu.
  • The scheduler selects nodes that have the requested GPU count available.

Important behavior:

  • For extended resources like GPUs, Kubernetes schedules based on limits. Set limits for nvidia.com/gpu; requests must equal limits if both are specified.
  • A GPU is assigned exclusively to a container unless you use MIG or time-slicing mechanisms.

Example: Request a GPU in a Pod

Notes:

  • runtimeClassName: nvidia is configured by the NVIDIA GPU Operator to ensure the correct runtime.
  • Use official CUDA-compatible images for best compatibility.

Cloud vs. On-Prem

  • Cloud: Use GPU instance families (AWS p3/p4/g5/g6, GCP A2/L4, Azure ND/NC). Benefits: elasticity and fast provisioning. Tradeoffs: cost and quota limits.
  • On-Prem/Edge: You control hardware and drivers; great for fixed workloads and data locality. Requires careful operations.

Node Requirements

  • NVIDIA driver installed on GPU nodes.
  • Container runtime with NVIDIA Container Toolkit support.
  • Kubernetes versions compatible with your device plugin and operator.
  • Optional but recommended: NVIDIA GPU Operator to manage drivers, device plugin, and monitoring.

The NVIDIA GPU Operator deploys and manages:

  • NVIDIA drivers
  • Container Toolkit
  • Device Plugin
  • DCGM and DCGM Exporter (for monitoring)
  • Node Feature Discovery (optional)

Example installation via Helm:

Post-install checks:

  • kubectl get pods -n gpu-operator
  • Ensure DaemonSets (nvidia-device-plugin, nvidia-driver-daemonset) and DCGM exporter are healthy.
  • kubectl describe node | grep -i nvidia to verify resources are advertised.

Tip: On platforms like Sealos, you can often install the GPU Operator from an app marketplace with a few clicks, then use namespaces and projects to isolate teams.


Taints and Tolerations

GPU nodes are valuable; you may want to schedule only GPU pods on them.

  • Add a taint to GPU nodes: kubectl taint nodes gpu=true:NoSchedule
  • Add toleration to GPU pods:

Node Affinity

Target specific GPU models or generations:

Labels like nvidia.com/gpu.product are often provided by the GPU Operator’s feature discovery components; validate actual label keys in your cluster.

Resource-Aware Scheduling

  • Pod PriorityClasses: Ensure mission-critical inference pods preempt lower-priority jobs if necessary.
  • Topology Manager: Align CPU, memory, and device allocation within a NUMA node for lower latency. Configure kubelet with topologyManagerPolicy: single-numa-node on GPU nodes for the strictest alignment.
  • Gang Scheduling: For multi-GPU or multi-pod jobs (e.g., distributed training), use Kueue or Volcano to ensure all pods start together, reducing stragglers.

GPU sharing is essential for maximizing utilization, especially for inference. Three main approaches:

1) Time-Slicing (Soft Sharing)

The NVIDIA device plugin can allow multiple pods to share a GPU by time-slicing.

  • Pros: Simple, good for light or bursty inference.
  • Cons: Performance is not isolated; throughput/latency can vary.

Example ConfigMap for time-slicing (actual schema may vary with plugin version; consult the plugin docs):

Patch or configure the device plugin DaemonSet to mount this ConfigMap.

Pods still request nvidia.com/gpu: 1; the plugin enforces sharing.

2) MIG (Multi-Instance GPU) on A100/H100

MIG splits one physical GPU into isolated GPU instances with dedicated memory and compute.

  • Pros: Strong isolation, predictable performance.
  • Cons: Static partitioning (reconfiguration requires draining or careful coordination).

With the NVIDIA GPU Operator, you can enable MIG mode and expose MIG profiles as distinct resources, e.g., nvidia.com/mig-1g.10gb.

Pod example:

3) MPS and vGPU

  • MPS (Multi-Process Service): NVIDIA feature to improve context sharing for CUDA workloads. Helps throughput with many small jobs but not strict isolation.
  • vGPU: NVIDIA Virtual GPU for virtualization platforms; can be surfaced to Kubernetes via appropriate plugins, most common in VDI or specialized environments.

Namespaces, Quotas, and Limits

  • ResourceQuota can enforce GPU consumption caps per namespace.

Notes:

  • Use limits.nvidia.com/gpu and/or requests.nvidia.com/gpu keys to govern extended resources.
  • LimitRange can set min/max constraints for GPUs per pod, but cannot set default requests/limits for extended resources.

Priority and Preemption

Create PriorityClass objects to ensure critical services preempt non-critical training jobs only when necessary.

Batch and Queued Workloads

  • Kueue: Kubernetes-native batch job queueing that integrates with resource quotas and orchestrates start times when GPUs are available.
  • Volcano: Provides gang scheduling and advanced batch features.

These frameworks help avoid idle resources and prevent head-of-line blocking for distributed jobs.

Platforms like Sealos can complement these with project-level isolation, self-service namespaces, and app store integrations for Kueue, Ray, or Kubeflow, improving your user experience for multi-tenant GPU clusters.


Cluster Autoscaler and Node Pools

  • Maintain a dedicated node group/pool for GPU instances.
  • Configure Cluster Autoscaler with scale-up policies for the GPU pool.
  • Taint GPU nodes and use tolerations so only GPU workloads trigger GPU node scale-ups.

Horizontal Pod Autoscaler (HPA) with GPU Metrics

HPA can scale on custom metrics (e.g., GPU utilization or inference latency).

  • Export GPU metrics with DCGM Exporter (deployed by GPU Operator).
  • Use a Prometheus Adapter to surface metrics to the Kubernetes Metrics API.
  • Define HPA based on a custom metric like dcgm_gpu_utilization.

Example HPA (conceptual; actual metric names may vary):

For batch jobs, consider Kueue-based scaling and Cluster Autoscaler, rather than HPA, to control when nodes are added.


A robust GPU cluster needs visibility:

  • DCGM Exporter: Exposes GPU metrics such as utilization, memory usage, temperature, and power draw.
  • Prometheus + Grafana: Set up dashboards for GPU health and performance.
  • Alerts: Trigger alerts on high temperature, low memory, ECC errors, or stalled jobs.

Example PromQL snippets:

  • Average GPU utilization per pod: avg by (pod) (dcgm_gpu_utilization)

  • Memory usage per GPU: dcgm_fb_used_bytes / dcgm_fb_total_bytes

  • Node-level power draw: avg by (instance) (dcgm_power_usage_watts)

In addition, instrument application-level metrics (e.g., inference latency, throughput) to correlate with GPU metrics.


GPU applications are often I/O intensive:

  • Use fast storage: NVMe local SSDs for scratch space; high-performance network storage for datasets.
  • Consider data caching layers like Alluxio or your object store’s caching gateways to reduce data fetch latency.
  • GPUDirect Storage (GDS): For advanced setups, GDS can bypass CPU for I/O, improving throughput. Ensure driver and kernel compatibility.
  • PersistentVolumeClaims for model artifacts and checkpoints; CSI drivers that support high throughput.

  • RuntimeClass: Use the NVIDIA runtime class; avoid privileged containers unless strictly necessary.
  • Avoid hostPath mounts to /dev/nvidia*; the device plugin maps devices automatically.
  • Image hygiene: Use trusted base images with pinned tags, scan for vulnerabilities, and keep CUDA libraries up to date.
  • Pod Security: Apply Pod Security Admission (baseline/restricted), NetworkPolicies to isolate tenants, and Secrets for credentials.
  • Egress governance: Control data exfiltration paths for compliance-sensitive AI workloads.

Driver and Toolkit Upgrades

  • The GPU Operator can orchestrate driver upgrades; use node draining and PodDisruptionBudgets (PDBs) for minimal downtime.
  • Validate CUDA/runtime compatibility in staging; pin image versions to avoid accidental incompatibilities.

Node Maintenance

  • Drain nodes before maintenance: kubectl drain --ignore-daemonsets --delete-emptydir-data
  • Ensure workloads have appropriate PDBs to avoid abrupt termination of critical services.

Performance Tuning Checklist

  • Enable topology-aware allocation on GPU nodes:
    • kubelet: topologyManagerPolicy=single-numa-node
    • CPU Manager: static policy for guaranteed CPU pinning if latency sensitive
  • Use MIG for strict isolation in multi-tenant inference.
  • Enable MPS for throughput-optimized micro-batch jobs.
  • Choose the right model serving stack:
    • NVIDIA Triton Inference Server for multi-framework serving and dynamic batching
    • TensorRT optimizations for low latency
  • Batch tuning:
    • Balance batch size vs. latency
    • Use dynamic batching for Triton
  • I/O:
    • Preload models
    • Warm up caches
    • Pin CPU memory for data loaders if applicable

Example 1: Inference Deployment with Affinity and Tolerations

Example 2: Resource Quotas per Team

Example 3: Gang-Scheduled Distributed Training (Conceptual)

  • Use Volcano or Kueue with a Job CRD (e.g., PyTorchJob, Kubeflow TFJob).
  • Ensure the scheduler starts all workers/PS replicas simultaneously.
  • Bind to GPU nodes with appropriate tolerations and affinities.

  • Batch training with sustained GPU usage:
    • MIG or dedicated GPUs for predictable performance.
  • Online inference with spiky, small requests:
    • Time-slicing or MPS to increase multiplexing.
  • Multi-tenant platform with strict isolation/SLA:
    • MIG profiles and quotas per namespace; PriorityClasses for critical workloads.
  • Cost-sensitive experimentation:
    • Time-slicing with quotas; elastic GPU node pools via Cluster Autoscaler.

Operating GPU clusters involves many moving parts. Consider layering platform abstractions:

  • “Cloud OS” on Kubernetes: Platforms like Sealos simplify cluster lifecycle, user projects, cost tracking, and app installation.
  • App marketplace: One-click deploy of NVIDIA GPU Operator, Ray, Kubeflow, or model-serving stacks to reduce setup time.
  • Self-service projects: Developers request GPUs within quotas and get isolated environments by default.

These approaches reduce toil and let you focus on models and applications rather than infrastructure plumbing.


  • Mismatched CUDA/driver versions:
    • Always verify the CUDA toolkit in your image is compatible with the node driver.
  • Forgetting runtimeClassName or lacking Container Toolkit:
    • Pods won’t see GPUs; use GPU Operator and test with nvidia-smi.
  • Overcommitting GPUs without a plan:
    • Time-slicing without SLO monitoring leads to unpredictable latency; set HPA and alerts.
  • Ignoring topology and NUMA:
    • Leads to cross-socket traffic and jitter; enable topology manager on GPU nodes.
  • Single-tenancy mindset in shared clusters:
    • Without quotas and priority classes, one team can starve others.

  1. Provision GPU nodes (cloud or on-prem).
  2. Install NVIDIA GPU Operator (drivers, device plugin, DCGM exporter).
  3. Label and taint GPU nodes; set tolerations for GPU workloads.
  4. Configure MIG or time-slicing if sharing is required.
  5. Enforce ResourceQuotas and PriorityClasses per namespace/team.
  6. Set up monitoring: Prometheus, Grafana, alerts on GPU and app metrics.
  7. Enable autoscaling:
    • Cluster Autoscaler for GPU node pool
    • HPA on custom metrics for inference
  8. Use gang scheduling for distributed training (Kueue/Volcano).
  9. Implement Pod Security, NetworkPolicies, and image scanning.
  10. Document upgrade procedures; test driver/runtime changes in staging.

Kubernetes offers a powerful, flexible foundation for running GPU workloads at scale, but realizing its full potential requires a thoughtful approach to provisioning and management. The core ideas are straightforward: expose GPUs via the device plugin, request them as extended resources, and use Kubernetes’ scheduling, policies, and operators to automate the rest. From there, you can progressively add sophistication—MIG for isolation, time-slicing for efficiency, quotas for fairness, topology tuning for performance, and autoscaling for elasticity.

Get the fundamentals right, and the benefits compound: faster experimentation, higher utilization, lower costs, and a better developer experience. Whether you craft your own stack or leverage platforms like Sealos to simplify operations and provide self-service workflows, the path to reliable, scalable GPU operations in Kubernetes is within reach.

Use this guide as your roadmap—start small with a single GPU node and the GPU Operator, then iterate toward multi-tenant, autoscaled, and observability-rich clusters that power your organization’s AI ambitions.