Interview's MateKubernetes
Interview's Mate

Kubernetes

K8s · Workloads · GitOps · Cloud

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
Kubernetes topics
Lesson 154/ 160
08. Cluster Administration & Managed Cloud Kubernetes

GPU Operator & Multi-Instance GPU (MIG) Slicing for AI Workloads

Install GPU Operator and slice GPUs with MIG for denser AI serving.

AdvancedGPU Operator · MIG · AI3 quiz questions
Practice DevOps Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

In plain words

MIG is dividing one industrial machine into separately metered work bays, while time-slicing is only sharing the same bay by appointment. The simple Kubernetes rule is: NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles.

Think of it like…

MIG is dividing one industrial machine into separately metered work bays, while time-slicing is only sharing the same bay by appointment.

Where you’ve seen it

During a controlled maintenance window, the platform operator runs kubectl get pods -n gpu-operator; nvidia-smi mig -lgip; kubectl describe node gpu-1. Expected evidence: NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles. If the run instead shows this symptom, stop and restore the last known state: MIG mode changes generally require draining workloads, and non-MIG time-slicing increases sharing without memory or fault isolation.

Words you’ll hear

GPU Operator
For this lesson, GPU Operator is the controlling idea: NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles.
MIG
MIG is the checkpoint; run kubectl get pods -n gpu-operator; nvidia-smi mig -lgip; kubectl describe node gpu-1 and inspect the owner chain. MIG mode changes generally require draining workloads, and non-MIG time-slicing increases sharing without memory or fault isolation.
AI
AI is the outcome to preserve; the cost is explicit: Operator-managed GPU enablement simplifies nodes, but driver compatibility, host access, licensing, topology, and restart windows remain hardware-specific.
Verification evidence
The evidence command is kubectl get pods -n gpu-operator; nvidia-smi mig -lgip; kubectl describe node gpu-1. It connects the declaration to this behavior: Install GPU Operator and slice GPUs with MIG for denser AI serving.

Visual diagram

Loading interactive diagram

Theory & deep dive

How GPU Operator reaches the intended state

Install GPU Operator and slice GPUs with MIG for denser AI serving. NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles.

The concrete checkpoint is kubectl get pods -n gpu-operator; nvidia-smi mig -lgip; kubectl describe node gpu-1; compare the GPU Operator owner, MIG state, and AI outcome instead of treating YAML acceptance as proof.

Verify MIG, not only object creation

Run kubectl get pods -n gpu-operator; nvidia-smi mig -lgip; kubectl describe node gpu-1 after the change and correlate the result with Events and the owning object. NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles.

Key takeaway: GPU Operator is implemented only when this invariant remains observable: NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles.

MIG: failure boundary and production cost

MIG mode changes generally require draining workloads, and non-MIG time-slicing increases sharing without memory or fault isolation. The prerequisite contract is concrete: NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles.

Operator-managed GPU enablement simplifies nodes, but driver compatibility, host access, licensing, topology, and restart windows remain hardware-specific. A safe design limits blast radius, records the last good configuration, and uses kubectl get pods -n gpu-operator; nvidia-smi mig -lgip; kubectl describe node gpu-1 as a deterministic rollback checkpoint.

Recover from MIG drift

Capture the current state with kubectl get pods -n gpu-operator; nvidia-smi mig -lgip; kubectl describe node gpu-1, then correct the controlling manifest rather than patching a child object; the relevant divergence signal is specific: MIG mode changes generally require draining workloads, and non-MIG time-slicing increases sharing without memory or fault isolation.

Key takeaway: Accept the trade-off consciously: Operator-managed GPU enablement simplifies nodes, but driver compatibility, host access, licensing, topology, and restart windows remain hardware-specific.

How it works, step by step

Step 1 of 4
Platform planner

1. Plan the lifecycle boundary

Inventory versions, capacity, state, backups, and ownership in a reversible plan: NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles.

GPU Operator contract → owned state
Key numbers at this step
Goal
Install GPU Operator and slice GPUs with MIG for denser AI serving.
Owner
GPU Operator

When to use it & trade-offs

What it is

Install GPU Operator and slice GPUs with MIG for denser AI serving. NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles.

Why it matters: MIG mode changes generally require draining workloads, and non-MIG time-slicing increases sharing without memory or fault isolation. The invariant at risk is specific: NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles. The quickest fact check before changing the design is kubectl get pods -n gpu-operator; nvidia-smi mig -lgip; kubectl describe node gpu-1.

When to reach for it

  • Use GPU Operator to enforce this invariant: NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles.
  • Use MIG evidence from kubectl get pods -n gpu-operator; nvidia-smi mig -lgip; kubectl describe node gpu-1 in reviews and incident timelines. Install GPU Operator and slice GPUs with MIG for denser AI serving.
  • Choose the managed cloud or platform service route only when this cost is justified by governance or scale: Operator-managed GPU enablement simplifies nodes, but driver compatibility, host access, licensing, topology, and restart windows remain hardware-specific.

When to avoid or be careful

  • Avoid assuming GPU Operator is complete after YAML submission; the required behavior is concrete: NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles.
  • Avoid treating the next symptom as random; check the owner and state with kubectl get pods -n gpu-operator; nvidia-smi mig -lgip; kubectl describe node gpu-1 first: MIG mode changes generally require draining workloads, and non-MIG time-slicing increases sharing without memory or fault isolation.
  • Avoid adopting a heavier platform wrapper before measuring its cost: Operator-managed GPU enablement simplifies nodes, but driver compatibility, host access, licensing, topology, and restart windows remain hardware-specific.

Native, manual, and managed paths for GPU Operator

Repeatable infrastructure control
Best for: Install GPU Operator and slice GPUs with MIG for denser AI serving. A concrete incident check is kubectl get pods -n gpu-operator; nvidia-smi mig -lgip; kubectl describe node gpu-1.

Strengths: NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles.

Watch out: Operator-managed GPU enablement simplifies nodes, but driver compatibility, host access, licensing, topology, and restart windows remain hardware-specific. Recovery must also recognize this signal: MIG mode changes generally require draining workloads, and non-MIG time-slicing increases sharing without memory or fault isolation.

Manual cluster mutation
Best for: Quickly testing the MIG assumption with kubectl get pods -n gpu-operator; nvidia-smi mig -lgip; kubectl describe node gpu-1; the expected invariant is: NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles.

Strengths: kubectl get pods -n gpu-operator; nvidia-smi mig -lgip; kubectl describe node gpu-1 gives immediate feedback without first building a platform layer.

Watch out: A manual change can hide drift, and unlike GPU Operator, it does not make this symptom self-documenting: MIG mode changes generally require draining workloads, and non-MIG time-slicing increases sharing without memory or fault isolation.

Managed cloud or platform service
Best for: Teams that need AI integrated with guardrails; the evidence path is kubectl get pods -n gpu-operator; nvidia-smi mig -lgip; kubectl describe node gpu-1.

Strengths: Platform controls can wrap this exact behavior in policy or dashboards: NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles.

Watch out: The added platform ownership buys value at this cost: Operator-managed GPU enablement simplifies nodes, but driver compatibility, host access, licensing, topology, and restart windows remain hardware-specific.

Interview signals & numbers to know

When this topic comes up

  • Interview anchor: NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles.
  • Trace GPU Operator to AI through MIG; the invariant is: NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles.
  • Recognize the symptom: MIG mode changes generally require draining workloads, and non-MIG time-slicing increases sharing without memory or fault isolation.
  • Justify the cost: Operator-managed GPU enablement simplifies nodes, but driver compatibility, host access, licensing, topology, and restart windows remain hardware-specific.
  • Verify with kubectl get pods -n gpu-operator; nvidia-smi mig -lgip; kubectl describe node gpu-1 instead of only inspecting YAML.

Benchmarks & rules of thumb

2 -
GPU sharing approaches: MIG and time-slicing
7 -
maximum 1g-style instances in the original A100 40GB or 80GB profiles, with model-specific availability
0 -
memory isolation is provided by time-slicing alone

Common mistakes & follow-ups

Common interview mistakes

  • Debugging only the child object misses the GPU Operator owner contract: NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles.
  • Ignoring this telltale condition leads to unrelated changes: MIG mode changes generally require draining workloads, and non-MIG time-slicing increases sharing without memory or fault isolation.
  • Repeating kubectl get pods -n gpu-operator; nvidia-smi mig -lgip; kubectl describe node gpu-1 without an owner for remediation wastes retry cost. Operator-managed GPU enablement simplifies nodes, but driver compatibility, host access, licensing, topology, and restart windows remain hardware-specific.

Likely interviewer follow-ups

  • How would API output and runtime evidence prove this behavior: NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles?
  • Which owner object, logs, and Events would you inspect for this symptom-MIG mode changes generally require draining workloads, and non-MIG time-slicing increases sharing without memory or fault isolation-?
  • At what threshold would this cost become unacceptable: Operator-managed GPU enablement simplifies nodes, but driver compatibility, host access, licensing, topology, and restart windows remain hardware-specific?
Interview tip: Interview sequence: state the invariant, run kubectl get pods -n gpu-operator; nvidia-smi mig -lgip; kubectl describe node gpu-1, name the failure, then justify the cost. Invariant: NVIDIA GPU Operator reconciles drivers and container-toolkit components, device plugins, and monitoring; MIG divides supported datacenter GPUs into isolated compute and memory profiles. Failure: MIG mode changes generally require draining workloads, and non-MIG time-slicing increases sharing without memory or fault isolation. Cost: Operator-managed GPU enablement simplifies nodes, but driver compatibility, host access, licensing, topology, and restart windows remain hardware-specific.

Knowledge check

Loading quiz

Put it into practice

Practice related interview Q&A

Apply GPU Operator & Multi-Instance GPU (MIG) Slicing for AI Workloads with generative AI interview Q&A and hands-on practice.

Open DevOps Q&A →Tech Learn Q&A
Previous topic
Edge & Lightweight Kubernetes Distributions (k3s, Talos Linux, MicroK8s)
Next topic
Running Distributed AI Training & Inference (vLLM, Ray / KubeRay) on K8s