Advanced Kubernetes: Resource Management for ML Workloads

Use Requests, Limits, Quotas, Taints and Node Affinity So Training Jobs Land on GPU Nodes and Never Starve Your Serving Pods. (MLOPS: ABSOLUTE BEGINNERS TO PRO IN 100 DAYS - DAY 59)

By Sandip Das · · 5 min read

Advanced Kubernetes: Resource Management for ML Workloads
💡
Hey — It's Sandip Das 👋

In Day 58 we packaged our cloud resources into a reusable Terraform module for dev and prod. Inside the cluster, though, everything still shares nodes on a first-come basis: one greedy training pod can starve the iris API, and an expensive GPU node can end up running a log shipper.

Today we take control: requests and limits, LimitRanges and ResourceQuotas per team namespace, and GPU node pools with taints, tolerations and node affinity, finished with a GPU training Job manifest.

📚 Key Learnings

  • How requests and limits drive scheduling, throttling, OOM kills and QoS classes
  • LimitRange for per-pod defaults and ResourceQuota for per-namespace budgets
  • How GPUs appear in Kubernetes (nvidia.com/gpu) and why they are all-or-nothing
  • Taints, tolerations and node affinity: keeping GPU nodes for GPU work only
  • Hands-on: a GPU training Job with r

    Read the full article on learnxops.com.

    Topics: 100 Days of MLOps, MLOps, ML, Kubernetes