Skip to main content
๐ŸŽ“ Claude Code Masterclass Learn AI-assisted development on Udemy โ€” plus the companion book on Leanpub & Amazon. Start Learning
GPU on Kubernetes with NVIDIA guide 2026
AI

GPU on Kubernetes: Getting Started with NVIDIA in 2026

Run GPU workloads on Kubernetes with NVIDIA GPU Operator. Step-by-step guide covering installation, scheduling, multi-tenant GPU sharing, and monitoring.

LB
Luca Berton
ยท 1 min read

I gave a talk at KubeCon Europe 2026 on multi-tenant GPU orchestration on bare metal. GPU workloads on Kubernetes are the fastest-growing segment. Here is how to get started.

Architecture Overview

Kubernetes Cluster
โ”œโ”€โ”€ Control Plane (no GPU)
โ”œโ”€โ”€ CPU Worker Nodes (general workloads)
โ””โ”€โ”€ GPU Worker Nodes
    โ”œโ”€โ”€ NVIDIA Driver
    โ”œโ”€โ”€ NVIDIA Container Toolkit
    โ”œโ”€โ”€ NVIDIA Device Plugin (DaemonSet)
    โ””โ”€โ”€ GPU Operator (manages everything)

Step 1: Install NVIDIA GPU Operator

The GPU Operator automates driver installation, container toolkit setup, and device plugin deployment:

# Add NVIDIA Helm repo
helm repo add nvidia https://helm.ngc.nvidia.com/nvidia
helm repo update

# Install GPU Operator
helm install --wait gpu-operator nvidia/gpu-operator \
  --namespace gpu-operator \
  --create-namespace \
  --set driver.enabled=true \
  --set toolkit.enabled=true

Verify:

kubectl get pods -n gpu-operator
# All pods should be Running

kubectl get nodes -o custom-columns="NAME:.metadata.name,GPU:.status.allocatable.nvidia\.com/gpu"
# Should show GPU count per node

Step 2: Run Your First GPU Pod

apiVersion: v1
kind: Pod
metadata:
  name: gpu-test
spec:
  restartPolicy: OnFailure
  containers:
    - name: cuda-test
      image: nvidia/cuda:12.8.0-base-ubuntu24.04
      command: ["nvidia-smi"]
      resources:
        limits:
          nvidia.com/gpu: 1
kubectl apply -f gpu-test.yaml
kubectl logs gpu-test
# Should show nvidia-smi output with your GPU

Step 3: Deploy AI Inference

apiVersion: apps/v1
kind: Deployment
metadata:
  name: llm-inference
spec:
  replicas: 1
  selector:
    matchLabels:
      app: llm-inference
  template:
    metadata:
      labels:
        app: llm-inference
    spec:
      containers:
        - name: vllm
          image: vllm/vllm-openai:latest
          args:
            - "--model"
            - "meta-llama/Llama-3-8B"
            - "--max-model-len"
            - "4096"
          ports:
            - containerPort: 8000
          resources:
            limits:
              nvidia.com/gpu: 1
              memory: 32Gi
            requests:
              cpu: "4"
              memory: 16Gi
---
apiVersion: v1
kind: Service
metadata:
  name: llm-inference
spec:
  selector:
    app: llm-inference
  ports:
    - port: 8000

GPU Sharing: Multi-Tenant

By default, one GPU = one pod. For sharing GPUs across teams:

Time-Slicing (MPS)

# ConfigMap for GPU time-slicing
apiVersion: v1
kind: ConfigMap
metadata:
  name: time-slicing-config
  namespace: gpu-operator
data:
  any: |-
    version: v1
    sharing:
      timeSlicing:
        resources:
          - name: nvidia.com/gpu
            replicas: 4  # 4 pods share 1 physical GPU

MIG (Multi-Instance GPU) โ€” A100/H100

# Enable MIG on H100
nvidia-smi mig -cgi 19,19,19,19,19,19,19 -C
# Creates 7 MIG instances from one H100

Monitoring GPU Utilization

Deploy DCGM Exporter for Prometheus metrics:

helm install dcgm-exporter nvidia/dcgm-exporter \
  --namespace gpu-operator \
  --set serviceMonitor.enabled=true

Key metrics:

  • DCGM_FI_DEV_GPU_UTIL โ€” GPU utilization percentage
  • DCGM_FI_DEV_MEM_COPY_UTIL โ€” Memory utilization
  • DCGM_FI_DEV_GPU_TEMP โ€” Temperature
  • DCGM_FI_PROF_GR_ENGINE_ACTIVE โ€” Compute activity

Best Practices

  1. Use node affinity to schedule GPU pods only on GPU nodes
  2. Set resource requests AND limits for GPU memory
  3. Enable time-slicing for development clusters
  4. Use MIG for production multi-tenant workloads
  5. Monitor utilization โ€” idle GPUs are expensive GPUs
#Kubernetes #GPU #NVIDIA #AI #Machine Learning
Share:
OpenShift AI Multi-Tenant GPU Architecture

Need help with OpenShift AI Multi-Tenant GPU Architecture?

MIG vs time-slicing vs full-GPU passthrough, isolation, scheduling, and chargeback.

Learn more about OpenShift AI Multi-Tenant GPU Architecture

Want to operate this yourself, in production?

Take the free AI Platform Engineer Readiness Scorecard to see which skills transfer โ€” then build a production-shaped AI platform in the 4-week Bootcamp.

Take the Scorecard โ†’
Luca Berton โ€” AI & Cloud Advisor, Docker Captain

Luca Berton

AI & Cloud Advisor ยท Docker Captain ยท KubeCon Speaker

15+ years in enterprise infrastructure. Author of 8 technical books, creator of Ansible Pilot (1M+ YouTube views, 648K site users). Former Red Hat engineer. Speaker at KubeCon EU 2026 and Red Hat Summit 2026.

Free 30-min AI & Cloud consultation

Book Now