Basic GPU Pod request
resources:
limits:
nvidia.com/gpu: 1
# Scheduler needs a node exposing available nvidia.com/gpu- GPU is part of placement.
- Cluster administrators must install/configure the corresponding device support.
Kubernetes does not make a model faster by itself. It gives you a control plane for placing, restarting and scaling containers. AI workloads add scarce accelerators, large images/models, warm-up time and unusual capacity constraints.
Engineering focus: Kubernetes scheduling and operating patterns for AI workloads
Kubernetes does not make a model faster by itself. It gives you a control plane for placing, restarting and scaling containers. AI workloads add scarce accelerators, large images/models, warm-up time and unusual capacity constraints.
Do not memorize product names first. Build the mental model, watch the system move, then map tools onto it.
The scheduler can only place a workload where resource, label and policy constraints all match.
The Pod declares CPU, memory and any accelerator resource plus placement constraints.
nvidia.com/gpu=1Kubernetes device plugins commonly expose vendor resources such as nvidia.com/gpu. Workloads request the accelerator, and the scheduler places the Pod only on nodes advertising available matching resources.
Modern Kubernetes also has Dynamic Resource Allocation for richer device claims, but beginners should first understand the basic resource-and-placement model.
Installing Kubernetes does not automatically install GPU drivers or device integration.
GPU nodes are expensive and often isolated with taints so ordinary workloads do not consume them. AI Pods then add tolerations plus node selectors/affinity for the required hardware class.
Every hard placement rule reduces the eligible node set. Debug unschedulable Pods by checking constraints together, not one at a time.
Adding more labels/affinity does not make placement smarter if the rules conflict.
A container can be Running while it is still downloading/loading model weights, allocating GPU memory or warming caches. Readiness should become true only when useful inference can be served.
Keep liveness, readiness and startup semantics distinct so slow initialization does not trigger destructive restart loops.
Using the same probe for startup, readiness and liveness can create restart loops.
AI serving bottlenecks may be queue depth, concurrency slots, TTFT, accelerator utilization or memory headroom. CPU can stay low while the GPU queue is saturated.
Autoscaling also has delay: a new Pod may need scheduling, image pull, model load and warm-up before adding capacity.
Autoscaling cannot instantly create scarce GPU capacity.
Change GPU request, node capacity, labels and tolerations to see why a Pod runs or stays Pending.
This simulator teaches relationships and diagnostic reasoning. Its synthetic values are not vendor benchmarks, hardware-sizing evidence or production SLO measurements.
resources:
limits:
nvidia.com/gpu: 1
# Scheduler needs a node exposing available nvidia.com/gpustartupProbe: allow model load
readinessProbe: inference endpoint ready
livenessProbe: process/runtime stuck detectionGoal: Use a deterministic scheduler model to diagnose GPU capacity, taint and label mismatches before running real Kubernetes.
python3 public/labs/llmops/14_kubernetes_ai_scheduler.py healthypython3 public/labs/llmops/14_kubernetes_ai_scheduler.py no-gpupython3 public/labs/llmops/14_kubernetes_ai_scheduler.py taintpython3 public/labs/llmops/14_kubernetes_ai_scheduler.py labelProduction GPU clusters need standardized device integration, hardware labels, taints, readiness semantics and capacity telemetry so teams can understand why workloads are Pending or slow to become ready.
This checklist is a study aid, not a proficiency score. Your evidence record remains based on tracked learning activity and later formal assessment.
Answer before opening each explanation. Opening all four answers records knowledge-check activity in My Learning.
The GPU node must be configured with drivers/device integration that exposes the schedulable GPU resource.
Other hard constraints such as taints, labels/affinity or resource naming may make that node ineligible.
Startup can take a long time; readiness should gate traffic without causing premature restarts during initialization.
Queue depth, concurrency saturation, TTFT or another signal tied to the actual serving bottleneck.
Progress is saved in this browser immediately. When you sign in to My Learning, it can also sync across devices.
Attempt the core lab and knowledge checks before marking the module complete.