These steps are only required for the *-ai portfolios when you intend to run
local LLM inference on-cluster (i.e. aiProvider=local). If you plan to use a
cloud provider such as OpenAI or Azure OpenAI (aiProvider=openai), skip this
doc entirely.
Note: This guide assumes you have already followed prepare-k3s.md up to (but not including) the
k3d cluster createstep. We re-create the cluster here with GPU passthrough.
- NVIDIA GPU with >= 4G memory, preferably >= 16G
- Latest NVIDIA driver installed (with WSL support if using WSL)
mkdir -p ~/k3d/localk8s-storage
k3d cluster create localk8s \
--image hbai/cuda:0.1 \
--gpus all \
--k3s-arg "--disable=traefik@server:0" \
--volume "$HOME/k3d/localk8s-storage:/var/lib/rancher/k3s@server:0" \
--volume "/usr/lib/wsl:/usr/lib/wsl@server:0" \
--volume "/dev/dxg:/dev/dxg@server:0"NOTE: To build the
hbai/cuda:0.1image yourself, useassets/gpu/Dockerfile.nvidia:docker build -t hbai/cuda:0.1 -f tutorials/common/assets/gpu/Dockerfile.nvidia .
Kaito needs a cluster policy to patch StatefulSets with the NVIDIA
runtimeClassName:
helm repo add kyverno https://kyverno.github.io/kyverno/
helm repo update
helm upgrade --install kyverno kyverno/kyverno \
-n kyverno \
--create-namespacekubectl apply -f tutorials/common/assets/gpu/gpu_bootstrap.yaml./tutorials/common/assets/gpu/validate_gpu.shKaito's node estimator reads nvidia.com/gpu.memory to size workloads. WSL2
GPU Feature Discovery may not auto-populate all labels, so set them manually:
export NODE_NAME=k3d-localk8s-server-0 # adjust via `kubectl get nodes`
kubectl label node $NODE_NAME nvidia.com/gpu=true
kubectl label node $NODE_NAME nvidia.com/gpu.product=<your-gpu-product>
kubectl label node $NODE_NAME nvidia.com/gpu.present=true
kubectl label node $NODE_NAME nvidia.com/gpu.count=1
kubectl label node $NODE_NAME nvidia.com/gpu.memory=<MiB>Tip: If you have a small GPU, you can over-claim
nvidia.com/gpu.memory(e.g. label a 4GiB GPU as12288) to coax the Kaito estimator into scheduling small models likeQwen/Qwen3-0.6Bon a single node.
helm repo add kaito https://kaito-project.github.io/kaito/charts/kaito
helm repo update
helm upgrade --install kaito-workspace kaito/workspace \
--create-namespace \
--version 0.10.0 \
--namespace kaito-workspace \
--set featureGates.disableNodeAutoProvisioning=true \
--set nvidiaDevicePlugin.enabled=false \
--set localCSIDriver.useLocalCSIDriver=falseNOTE: Minimum required Kaito version is 0.9.0.
nvidiaDevicePlugin.enabled=falseavoids conflict with the device-plugin DaemonSet bundled in step 3.disableNodeAutoProvisioning=trueenables BYO GPU mode.
| Issue | Workaround |
|---|---|
Webhook panic (MustParse("")) when applying a generic-model Workspace in BYO mode |
kubectl delete validatingwebhookconfiguration validation.workspace.kaito.sh |
Node estimator ignores max-model-len from the ConfigMap and over-estimates targetNodeCount |
Inflate the nvidia.com/gpu.memory node label to satisfy the estimator |