A frequently shared topic on the NVIDIA DGX Spark forum is how to set up a proper local Kubernetes cluster with GPU passthrough. This guide walks you through setting up K3s on your DGX Spark GB10 so you can serve LLMs like Qwen3 or Llama using vLLM. Prerequisites NVIDIA DGX Spark with DGX OS (Ubuntu-based) […]
Collabnix Team Follow The Collabnix Team is a diverse collective of Docker, Kubernetes, and IoT experts united by a passion for cloud-native technologies. With backgrounds spanning across DevOps, platform engineering, cloud architecture, and container orchestration, our contributors bring together decades of combined experience from various industries and technical domains.
21st June 2026 1 min read
A frequently shared topic on the NVIDIA DGX Spark forum is how to set up a proper local Kubernetes cluster with GPU passthrough. This guide walks you through setting up K3s on your DGX Spark GB10 so you can serve LLMs like Qwen3 or Llama using vLLM.
Prerequisitesnvidia-smi
# Should show GB10 Grace Blackwell GPU
Step 2: Install NVIDIA Container Toolkit
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
Step 3: Set NVIDIA as the Default Docker Runtime
This is a critical step. K3s needs Docker to use the NVIDIA runtime by default, otherwise GPU pods will fail to start.
sudo nvidia-ctk runtime configure --runtime=docker --set-as-default
sudo systemctl restart docker
docker run --rm --gpus all nvidia/cuda:12.0-base-ubuntu22.04 nvidia-smi
Step 4: Install K3s Using Docker as the Container Runtime
curl -sfL https://get.k3s.io | sh -s - --docker --write-kubeconfig-mode 644 --disable traefik
Step 5: Verify K3s is Running
sudo systemctl status k3s
kubectl get nodes
# Should show node in Ready state
Step 6: Install Helm
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
Step 7: Install NVIDIA GPU Operator (Drivers Pre-installed)
Since drivers are already installed on DGX Spark, disable the driver component to avoid conflicts.
helm repo add nvidia https://helm.ngc.nvidia.com/nvidia
helm repo update
helm install gpu-operator nvidia/gpu-operator --namespace gpu-operator --create-namespace --set driver.enabled=false --set toolkit.enabled=false --wait
Step 8: Verify GPU is Visible to Kubernetes
kubectl get nodes -o json | jq '.items[].status.capacity'
# Look for: "nvidia.com/gpu": "1"
Step 9: Create NGC Pull Secret
kubectl create secret docker-registry ngc-secret --docker-server=nvcr.io --docker-username='$oauthtoken' --docker-password=YOUR_NGC_API_KEY --namespace default
Step 10: Deploy vLLM with Qwen3-4B
kubectl apply -f vllm-deployment.yaml
# vllm-deployment.yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: vllm-qwen3
spec:
replicas: 1
selector:
matchLabels:
app: vllm-qwen3
template:
metadata:
labels:
app: vllm-qwen3
spec:
imagePullSecrets:
- name: ngc-secret
containers:
- name: vllm
image: nvcr.io/nvidia/vllm:25.12-py3
args: ["--model", "Qwen/Qwen3-4B", "--port", "8000"]
resources:
limits:
nvidia.com/gpu: 1
Step 11: Expose and Test
kubectl expose deployment vllm-qwen3 --type=NodePort --port=8000
# Then test with:
curl http://localhost:PORT/v1/chat/completions -H "Content-Type: application/json" -d '{"model": "Qwen/Qwen3-4B", "messages": [{"role": "user", "content": "Hello!"}]}'
Troubleshooting
GPU not in node capacity: Run kubectl describe node and restart the NVIDIA device plugin with kubectl rollout restart daemonset -n gpu-operator.
Pod stuck in ContainerCreating: Ensure Docker uses NVIDIA runtime by default. Re-run: sudo nvidia-ctk runtime configure –runtime=docker –set-as-default
ConclusionYou now have a fully functional K3s Kubernetes cluster on your NVIDIA DGX Spark. Scale to multi-node by adding workers with the K3s join token found at /var/lib/rancher/k3s/server/node-token.
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | How to Connect Two NVIDIA DGX Spark Nodes as Kubernetes GPU Workers for Distributed AI Inference | 0 | 6.3 | 21-06-2026 |
| 2 | Deploying NVIDIA NIM Containers on DGX Spark with Minikube: A Complete Guide for AI Researchers | 0 | 7.18 | 21-06-2026 |
| 3 | How to Run GPU Workloads on Kubernetes with NVIDIA: A Step-by-Step Guide | 0 | 10.06 | 26-06-2026 |
| 4 | Running GPU Workloads on Kubernetes with NVIDIA: A Comprehensive Guide | 0 | 9.6 | 21-09-2026 |
| 5 | Running vLLM on NVIDIA DGX Spark with Docker: Zero-Compilation Guide for CUDA 13 | 0 | 8.69 | 21-06-2026 |
| 6 | Docker Compose vs Kubernetes on NVIDIA DGX Spark: Which Setup Should You Choose for NIM Microservices? | 0 | 5.79 | 21-06-2026 |
| 7 | Deploying LLM Inference at Scale on Kubernetes | 0 | 8.46 | 14-09-2026 |
| 8 | Deploying LLM Inference at Scale on Kubernetes: A Comprehensive Guide | 0 | 9.07 | 20-07-2026 |
| 9 | How to Run LLMs Locally: Complete Setup with Ollama | 0 | 5.63 | 02-07-2026 |
| 10 | How GPU Allocation Works in Kubernetes: A Simple Explainer | 0 | 10.79 | 05-07-2026 |