Tech Blog by vClusterPress and Media Resources

Running a mini AI factory on two bare-metal GPU servers

Dec 1, 2026
|
40
min Read
Running a mini AI factory on two bare-metal GPU servers

"Will everyone build an AI Factory?" is a top question for 2026 and 2027, and my answer is yes. It might be one GPU on a desk, a rack for the company, a shipping container or a whole AI Cloud. Only the size changes.

At GTC in Berlin, NVIDIA announced the DSX POD: a reference design for complete NVIDIA Vera Rubin AI factories that partners build and validate inside modular containers, cutting deployment at a prepared site from six months to as little as 14 days. That makes the hardware the faster half. The slower half starts on day 15, where every team, app and customer needs its own safe slice of those GPUs.

Let's build a small AI factory on two bare-metal servers with three NVIDIA L4 GPUs. Every file is in the repo: saiyam1814/ai-factory-bare-metal.

In this post, we will see:

  • how to turn one bare-metal machine into the control plane cluster, with a tenant cluster for each team
  • how HAMi gives each team a portion of one GPU, and what happens when a team asks for more
  • how a second machine joins one tenant cluster as a private node, and how NVIDIA Dynamo splits one request across its two GPUs
  • where the time goes inside that request

Why bother: most GPUs sit idle

How busy are the GPUs companies already use? VentureBeat pooled three monthly surveys from July to September 2026, and 79% of the 218 respondents running AI in production who gave a number said their GPUs are busy half the time or less. These are self-reported answers from a self-selected group, so read the number as a rough signal.

One vendor's measurements come out even lower. Cast AI's 2026 State of Kubernetes Optimization Report puts average GPU utilization at 5% across tens of thousands of Kubernetes clusters on AWS, Google Cloud and Azure.

The exact number depends on who you ask and how you count. Either way, most GPUs we already pay for sit idle for much of the day. The VentureBeat article shares how many companies lined up GPU capacity after the shortage scares of 2024 and 2025, and Cast AI points to provisioning sized for peak demand, with GPU sharing "nearly absent in practice". I think a big part of it is that every team gets its own GPUs, because putting several teams in one cluster without walls is a risk nobody wants to take. GPUs sitting idle don't just starve other teams. They waste money that is already spent.

The demo: Two machines, Four tenant clusters

Machine 1 runs the control plane cluster, three team tenant clusters with vLLM on portions of one L4, and the inference cluster's control plane. Machine 2 is the inference cluster's private node, with Dynamo prefill and decode on two L4s.

Two bare-metal servers from Utho, each with two AMD EPYC 7452 CPUs and 251 GB of memory:

  • Machine 1 (ai-factory-1) has one NVIDIA L4 with 24 GB of memory. It is the control plane cluster, and three teams each get a portion of its one GPU.
  • Machine 2 (ai-factory-2) has two L4s, and it belongs to one tenant cluster only: the inference cluster.

The versions: vCluster 0.37.0 on Kubernetes 1.36, HAMi 2.10.0, vLLM 0.32.0 for the team endpoints, and NVIDIA Dynamo 1.6.0, whose runtime image ships vLLM 0.31.0. The three team endpoints serve small Qwen2.5 models and the inference cluster serves Qwen3-0.6B. All four models are public, so you don't need a Hugging Face token.

What you need

  • Two Linux machines with NVIDIA GPUs, or one if you only want part 1. Both ran Ubuntu 24.04 with NVIDIA driver 615.71.09 and the NVIDIA Container Toolkit 1.20.1, installed with NVIDIA's guides for the driver and the Container Toolkit. nvidia-smi must list your GPUs before you start.
  • Different hostnames, because they become Kubernetes node names. Both servers here started out as utho and had to be renamed.
  • A network path from machine 2 to machine 1. Machine 2 joins through the inference cluster's API server, which is a NodePort on machine 1.
  • kubectl, Helm 3, jq and python3 on machine 1. The vCluster Standalone installer adds the vcluster CLI.
  • Disk for the images. The vLLM image is 9.2 GB on machine 1 and the Dynamo runtime image is 10.1 GB on machine 2. The models are small.
  • A vCluster Platform licence, for part 2 only. Private Nodes are a vCluster Platform feature. The Free tier includes them with no credit card, up to 64 CPUs or 32 GPUs; more on that in the sharp edges.

Run every command on machine 1 as root, unless a step says machine 2.

A note on the outputs: every block that starts with $ shows a real command and what it printed. Most install outputs come from the first build; the rest, and every check, come from the same setup a few days later, which is why the AGE columns there say 5d. A line with only ... marks lines cut from a longer output. The server address, the Platform host, the access key and the join token are replaced with placeholders such as <machine-1-ip>.

Part 1: three teams, one GPU

Part 1 runs on machine 1 alone, so if you have one GPU machine, steps 1 to 3 are all you need.

Step 1: turn machine 1 into the control plane cluster

Where do the tenant clusters live? Their control planes need a Kubernetes cluster to run on, and here there is only a bare-metal machine. vCluster Standalone turns that machine into a Kubernetes cluster, with no other cluster needed underneath, and its config is short:

controlPlane:
 standalone:
   enabled: true
   advertiseAddress: ${MACHINE_1_IP}
   joinNode:
     enabled: true
 proxy:
   extraSANs:
     - ${MACHINE_1_IP}

joinNode.enabled: true, which is also the default, makes the machine a worker too, so the same machine runs the pods. The sharp edges come back to what that means. envsubst fills in the address. Clone the repo, render the config and download the installer:

git clone https://github.com/saiyam1814/ai-factory-bare-metal && cd ai-factory-bare-metal
export MACHINE_1_IP=203.0.113.10   # machine 1's address, the one machine 2 can reach
envsubst < 01-control-plane-cluster/vcluster.yaml > /root/vcluster.yaml
curl -sfL https://github.com/loft-sh/vcluster/releases/download/v0.37.0/install-standalone.sh -o install-standalone.sh

Then run it:

$ sh install-standalone.sh --vcluster-name standalone --config /root/vcluster.yaml
🔄 Downloading vcluster binary...
vcluster CLI installed in /var/lib/vcluster/bin/vcluster-cli
🔄 Copying config file to /etc/vcluster/vcluster.yaml
🔄 Setting up persistent logging...
✅ systemd-journald restarted.
🔄 Creating vCluster systemd service...
🔄 Creating systemd service file /etc/systemd/system/vcluster.service
✅ vcluster.service created.
🔄 Starting vcluster.service...
Created symlink /etc/systemd/system/multi-user.target.wants/vcluster.service → /etc/systemd/system/vcluster.service.
✅ Successfully started vcluster.service
🔄 vCluster is waiting for the API Server to be ready...
🔄 vCluster is waiting for the API Server to be ready...
🔄 vCluster is waiting for the API Server to be ready...
🔄 vCluster is waiting for the API Server to be ready...
🔄 vCluster is waiting for the API Server to be ready...
🔄 vCluster is waiting for the API Server to be ready...
🔄 vCluster is waiting for the API Server to be ready...
🔄 vCluster is waiting for the API Server to be ready...
🔄 vCluster is waiting for the API Server to be ready...
🔗 Linking vcluster kubeconfig for kubectl...
🔗 Linking vcluster-cli to /usr/local/bin/vcluster...
✅ vCluster is ready. Use 'kubectl get pods' to access the vCluster.
To check vCluster logs, use 'journalctl -u vcluster.service --no-pager'

The installer links its kubeconfig for kubectl, so plain kubectl on machine 1 now talks to the control plane cluster:

$ kubectl get nodes
NAME           STATUS   ROLES                  AGE     VERSION
ai-factory-1   Ready    control-plane,master   5d12h   v1.36.0

One more thing before GPU pods can run: make the NVIDIA runtime containerd's default, so every GPU pod gets the driver libraries without a RuntimeClass.

$ nvidia-ctk runtime configure --runtime=containerd --set-as-default
...
time="2026-10-24T20:56:19Z" level=info msg="Using CRI runtime plugin name \"io.containerd.cri.v1.runtime\""
time="2026-10-24T20:56:19Z" level=info msg="Wrote updated config to /etc/containerd/conf.d/99-nvidia.toml"
time="2026-10-24T20:56:19Z" level=info msg="It is recommended that containerd daemon be restarted."
$ systemctl restart containerd

Step 2: Install HAMi, so a pod can ask for part of a GPU

How do three teams fit on one GPU? Kubernetes counts GPUs in whole numbers, and the L4 has no MIG, so it can't be cut in hardware either. HAMi cuts it in software. HAMi is a CNCF incubating project that adds a scheduler, an admission webhook and a device plugin to Kubernetes, and it works with NVIDIA GPUs and with other accelerators too, such as AMD, Huawei Ascend and AWS Neuron. A pod asks for nvidia.com/gpu: 1 plus nvidia.com/gpumem in MiB, and HAMi holds it to that much memory. More on how it does that in a moment.

The values file does two things:

scheduler:
 kubeScheduler:
   image:
     registry: registry.k8s.io
     repository: kube-scheduler
     tag: v1.36.0
devicePlugin:
 deviceSplitCount: 4

It pulls the kube-scheduler image in HAMi's scheduler pod from the upstream registry, registry.k8s.io, instead of the chart's default mirror, registry.cn-hangzhou.aliyuncs.com, with the cluster's version, v1.36.0, as the tag. That is the same tag the chart would pick on its own. And deviceSplitCount: 4 lets up to four containers share one GPU, where the default is 10. HAMi's device plugin runs on nodes labelled gpu=on, so label the node first:

$ kubectl label node ai-factory-1 gpu=on --overwrite
node/ai-factory-1 labeled
$ helm repo add hami https://project-hami.github.io/HAMi/ && helm repo update hami
"hami" has been added to your repositories
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "hami" chart repository
Update Complete. ⎈Happy Helming!⎈
$ helm upgrade --install hami hami/hami -n kube-system --version 2.10.0 -f 02-hami/values.yaml --wait --timeout 6m
...
TEST SUITE: None
NOTES:
** Please be patient while the chart is being deployed **
Resource name: nvidia.com/gpu
$ kubectl -n kube-system get pods -l app.kubernetes.io/instance=hami -o wide
NAME                              READY   STATUS    RESTARTS   AGE   IP           NODE           NOMINATED NODE   READINESS GATES
hami-device-plugin-x88n6          2/2     Running   0          49s   10.244.0.6   ai-factory-1   <none>           <none>
hami-scheduler-7bfbb96c49-fx64f   2/2     Running   0          49s   10.244.0.7   ai-factory-1   <none>           <none>

Let's see what HAMi found on the node:

$ kubectl get node ai-factory-1 -o jsonpath='{.metadata.annotations.hami\.io/node-nvidia-register}'; echo
[{"id":"GPU-73a98f24-e91d-fba5-74c3-8043018e4654","count":4,"devmem":23034,"devcore":100,"type":"NVIDIA L4","mode":"hami-core","health":true}]
$ kubectl get node ai-factory-1 -o jsonpath='{.status.allocatable.nvidia\.com/gpu}'; echo
4

HAMi registered the L4 with its 23,034 MiB and a count of 4, so the node now offers four nvidia.com/gpu. Each one is a slot for one container, and the memory that container gets is whatever it asks for in nvidia.com/gpumem. One container can't take two slots on the same GPU: nvidia.com/gpu: 2 means two physical GPUs.

Step 3: a Tenant cluster for each Team

Why a tenant cluster per team, and not a namespace each? CRDs and cluster-wide RBAC don't fit in a namespace, so a team that wants its own operator would need admin rights on the shared cluster. A tenant cluster gives each team its own API server, CRDs and RBAC, while its pods still run on machine 1 next to the other teams' pods.

$ for t in chat code docs; do vcluster create team-$t -n team-$t --add=false --connect=false; done
...
- Use 'vcluster connect team-docs --namespace team-docs' to access the virtual cluster
- Use `vcluster connect team-docs --namespace team-docs -- kubectl get ns` to run a command directly within the vcluster
$ vcluster list
     NAME    | NAMESPACE |  STATUS  | VERSION | CONNECTED | AGE
 ------------+-----------+----------+---------+-----------+------
   team-chat | team-chat | Init:0/1 | 0.37.0  |           | 29s
   team-code | team-code | Init:0/1 | 0.37.0  |           | 26s
   team-docs | team-docs | Init:0/1 | 0.37.0  |           | 22s

--connect=false keeps your kube context on the control plane cluster. --add=false keeps these three out of vCluster Platform, even when the CLI is logged in to one: the team clusters don't need it, and only the inference cluster in part 2 does.

Each team then gets one vLLM endpoint on its portion of the GPU: 7,000 MiB for chat and code, 5,000 MiB for docs. Here is the part of team chat's deployment that matters:

spec:
 schedulerName: hami-scheduler
 containers:
   - name: vllm
     image: vllm/vllm-openai:v0.32.0
     command: ["vllm", "serve"]
     args:
       - Qwen/Qwen2.5-1.5B-Instruct
       - --served-model-name=chat
       - --gpu-memory-utilization=0.85
     resources:
       limits:
         nvidia.com/gpu: 1
         nvidia.com/gpumem: 7000

schedulerName: hami-scheduler hands the pod to HAMi. vCluster copies each pod from the tenant cluster to the control plane cluster, where HAMi's scheduler places it on the GPU. vcluster connect <name> -- <command> runs a command against a tenant cluster, and -s keeps the CLI quiet so you only see the command's own output:

$ for t in chat code docs; do vcluster connect team-$t -n team-$t -s -- kubectl apply -f 03-team-clusters/$t.yaml; done
deployment.apps/chat created
service/chat created
deployment.apps/code created
service/code created
deployment.apps/docs created
service/docs created
$ vcluster connect team-chat -n team-chat -s -- kubectl rollout status deploy/chat --timeout=20m
deployment "chat" successfully rolled out

The first start takes a while: machine 1 pulls the 9.2 GB vLLM image, and each pod downloads its model into /data/models/team-<name> on the machine. That is part 1 built. We will look around in step 5, once part 2 is up too.

Part 2: an Inference cluster on its own machine

Part 1 suits trusted internal teams. A customer, or production traffic you sell, needs machines that nobody else can schedule onto, and that is what Private Nodes are for: machine 2 joins one tenant cluster as its private node, so neither the control plane cluster nor any other tenant cluster can run pods there. Let's set that up.

Step 4a: connect the CLI to vCluster Platform

Private Nodes are a vCluster Platform feature, so the CLI on machine 1 logs in to a Platform first. The demo used an existing vCluster Platform instance:

$ vcluster platform login https://<your-platform-host> --access-key <your-access-key> --use-driver helm
09:41:14 warn There is a newer version of vcluster: v0.37.5. Run `vcluster upgrade` to upgrade to the newest version.

09:41:15 done Successfully logged into vCluster Platform instance https://<your-platform-host>
09:41:16 done Successfully switched driver to helm

--use-driver helm keeps the CLI creating tenant clusters with Helm on this machine, the same way as in step 3. The warning only says that newer 0.37 patch releases exist; the demo stays on 0.37.0. If you don't have a Platform yet, vcluster platform start installs one into the control plane cluster and walks you through activation. On machine 1 it installed fine, but the demo never activated it, so that path is untested past the install.

Step 4b: Create the Inference Cluster

The inference cluster's config turns on private nodes:

privateNodes:
 enabled: true
 joinNode:
   # make the NVIDIA runtime containerd's default on the joining GPU node
   postJoinCommands:
     - nvidia-ctk runtime configure --runtime=containerd --set-as-default
     - systemctl restart containerd
controlPlane:
 service:
   spec:
     type: NodePort
 proxy:
   extraSANs:
     - ${MACHINE_1_IP}
networking:
 podCIDR: 10.64.0.0/16
 serviceCIDR: 10.128.0.0/16

The API server is a NodePort, so machine 2 can reach it. The cluster gets its own pod and service ranges, apart from the control plane cluster's. And postJoinCommands does on machine 2 what step 1 did on machine 1: it makes the NVIDIA runtime containerd's default.

$ envsubst < 04-inference-cluster/vcluster.yaml > /root/inference-vcluster.yaml
$ vcluster create inference -n inference --connect=false -f /root/inference-vcluster.yaml
...
21:14:24 info Create vcluster inference...
21:14:25 done Successfully created virtual cluster inference in namespace inference.
- Use 'vcluster connect inference --namespace inference' to access the virtual cluster
- Use `vcluster connect inference --namespace inference -- kubectl get ns` to run a command directly within the vcluster
$ kubectl -n inference get pods,svc
NAME              READY   STATUS    RESTARTS   AGE
pod/inference-0   1/1     Running   0          42s

NAME                         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                         AGE
service/inference            NodePort    10.108.11.174   <none>        443:31824/TCP,10250:30281/TCP   42s
service/inference-headless   ClusterIP   None            <none>        443/TCP                         42s

This time there is no --add=false, so the CLI adds the cluster to vCluster Platform, and the Platform's licence is what turns on Private Nodes. The build's first try did pass --add=false: the control plane pod went into CrashLoopBackOff and logged you are trying to use a vCluster pro feature 'Private Nodes'.

Machine 2 will join through this API server, so the cluster has to know the address machine 2 can reach: machine 1's address plus the NodePort, 31824 here. Add it as controlPlane.endpoint and upgrade the cluster:

$ NODEPORT=$(kubectl -n inference get svc inference -o jsonpath='{.spec.ports[?(@.name=="https")].nodePort}')
$ echo $NODEPORT
31824
$ sed -i "/^controlPlane:/a\  endpoint: \"$MACHINE_1_IP:$NODEPORT\"" /root/inference-vcluster.yaml
$ grep -A1 '^controlPlane:' /root/inference-vcluster.yaml
controlPlane:
 endpoint: "<machine-1-ip>:31824"
$ vcluster create inference -n inference --upgrade --connect=false -f /root/inference-vcluster.yaml
...
- Use 'vcluster connect inference --namespace inference' to access the virtual cluster
- Use `vcluster connect inference --namespace inference -- kubectl get ns` to run a command directly within the vcluster

Step 4c: Join machine 2 as a Private Node

A join token lets a machine join the inference cluster. The command prints the whole join line:

$ vcluster connect inference -n inference -s -- vcluster token create --expires=2h
curl -fsSLk "https://<machine-1-ip>:31824/node/join?token=<token>" | sh -

Run that line on machine 2 as root. It installs containerd and the kubelet, joins the node, and then runs the two post-join commands from the config:

$ curl -fsSLk "https://<machine-1-ip>:31824/node/join?token=<token>" | sh -
Detected OS: ubuntu
Preparing node for Kubernetes installation...
Kubernetes version: v1.36.0
Installing Kubernetes binaries...
Downloading Kubernetes binaries...
Downloading https://github.com/loft-sh/kubernetes/releases/download/v1.36.0/kubernetes-v1.36.0-amd64.tar.gz...
...
Installation successful!
Joining node into cluster...
[preflight] Running pre-flight checks
...
[kubelet-check] The kubelet is healthy after 501.430255ms
[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap

This node has joined the cluster:
* Certificate signing request was sent to apiserver and a response was received.
* The Kubelet was informed of the new secure connection details.

Run 'kubectl get nodes' on the control-plane to see this node join the cluster.

time="2026-10-24T21:17:59Z" level=info msg="Using config version 3"
time="2026-10-24T21:17:59Z" level=info msg="Using CRI runtime plugin name \"io.containerd.cri.v1.runtime\""
time="2026-10-24T21:17:59Z" level=info msg="Wrote updated config to /etc/containerd/conf.d/99-nvidia.toml"
time="2026-10-24T21:17:59Z" level=info msg="It is recommended that containerd daemon be restarted."

Back on machine 1, write a kubeconfig for the inference cluster that points at the same address, and use it for the rest of part 2:

vcluster connect inference -n inference --print --server "https://$MACHINE_1_IP:$NODEPORT" > /root/inference.kubeconfig
export KUBECONFIG=/root/inference.kubeconfig$ kubectl get nodes
NAME           STATUS   ROLES    AGE     VERSION
ai-factory-2   Ready    <none>   5d12h   v1.36.0

The inference cluster has exactly one node, and it is machine 2.

Step 4d: Storage, GPUs and Dynamo inside the Inference Cluster

What is already inside the inference cluster? vCluster deploys a few things into a cluster with private nodes, and this one has Flannel for the pod network, kube-proxy, CoreDNS and the local-path provisioner for storage, with its StorageClass marked as the default (deploy.localPathProvisioner in vcluster.yaml). Dynamo's etcd and NATS need volumes from that default StorageClass. Before Dynamo can run, the cluster still needs the NVIDIA device plugin, so pods can ask for whole GPUs, and Dynamo itself.

The build also ran these two storage commands. The apply updates vCluster's local-path provisioner from v0.0.31 to the upstream v0.0.37 manifest. That manifest has no default-class annotation, so kubectl apply removes the one vCluster had set, and the patch puts it back. Since vCluster's own StorageClass is already the default, both commands should be optional, but the build ran them, so that is the tested path. If you run the apply, run the patch too:

kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/v0.0.37/deploy/local-path-storage.yaml
kubectl patch storageclass local-path -p '{"metadata":{"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

Either way, check that there is a default StorageClass:

$ kubectl get sc
NAME                   PROVISIONER             RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
local-path (default)   rancher.io/local-path   Delete          WaitForFirstConsumer   false                  5d12h

The NVIDIA device plugin only runs on nodes that carry a GPU label, such as the NVIDIA PCI label that node feature discovery sets, or nvidia.com/gpu.present=true. There is no node feature discovery here, so label the node by hand, then install the plugin:

$ kubectl label node ai-factory-2 nvidia.com/gpu.present=true --overwrite
node/ai-factory-2 labeledhelm repo add nvdp https://nvidia.github.io/k8s-device-plugin && helm repo update nvdp
helm upgrade --install nvdp nvdp/nvidia-device-plugin --version 0.20.1 \
 -n nvidia-device-plugin --create-namespace --wait --timeout 5m$ kubectl get pods -n nvidia-device-plugin
NAME                              READY   STATUS    RESTARTS   AGE
nvdp-nvidia-device-plugin-hdpjw   1/1     Running   0          5d12h
$ kubectl get node ai-factory-2 -o jsonpath='{.status.allocatable.nvidia\.com/gpu}'; echo
2

The inference cluster can now hand out two whole GPUs. The Dynamo runtime image is 10.1 GB, which ctr shows as 9.4 GiB, so it is worth pulling it on machine 2 before the workers need it:

$ ctr -n k8s.io image pull nvcr.io/nvidia/ai-dynamo/vllm-runtime:1.6.0
...
Completed pull from OCI Registry (nvcr.io/nvidia/ai-dynamo/vllm-runtime:1.6.0)  elapsed: 534.0s  total:  9.4 Gi  (18.0 MiB/s)

What is Dynamo? NVIDIA Dynamo is an open-source serving layer that sits above an inference engine. Its README puts it plainly: it doesn't replace vLLM, SGLang or TensorRT-LLM, it runs them as workers and turns them into one coordinated system. Around the engine it adds a frontend with the OpenAI API, a router that knows which worker already holds a prompt's KV cache, the split of prefill and decode onto separate GPUs with NIXL moving the cache between them, and a Kubernetes operator that turns one YAML object, a DynamoGraphDeployment, into the pods and services for all of that. Here the engine inside the workers is vLLM, which is why the runtime image ships vLLM 0.31.0.

Dynamo's platform chart installs the operator, and an init container in the operator pod applies its six CRDs. In 1.6.0 neither etcd nor NATS is required: the default request plane is TCP, the event plane is ZMQ, and discovery on Kubernetes goes through the API server. The two flags here install them anyway, which is the setup the demo was tested with:

helm install dynamo-platform oci://nvcr.io/nvidia/ai-dynamo/dynamo-platform --version 1.6.0 \
 -n dynamo-system --create-namespace \
 --set global.nats.install=true --set global.etcd.install=true --wait --timeout 20m$ helm list -n dynamo-system
NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                   APP VERSION
dynamo-platform dynamo-system   1               2026-10-24 21:45:06.837277408 +0000 UTC deployed        dynamo-platform-1.6.0   1.6.0
$ kubectl get pods -n dynamo-system
NAME                                                              READY   STATUS    RESTARTS        AGE
dynamo-platform-dynamo-operator-controller-manager-f5bb9d7jdw57   1/1     Running   25 (7h2m ago)   5d11h
dynamo-platform-etcd-0                                            1/1     Running   0               5d11h
dynamo-platform-nats-0                                            2/2     Running   0               5d11h

Those 25 restarts are the Dynamo operator, and they are in the sharp edges below.

Now the serving setup itself. One DynamoGraphDeployment describes a frontend with the KV-aware router, a prefill worker and a decode worker, each worker on a whole GPU. The file is Dynamo's own disagg_router.yaml example from v1.6.0, cut down to one worker of each kind so it fits two L4s. Here is the part of the prefill worker that matters:

- name: prefill
 type: prefill
 replicas: 1
 podTemplate:
   spec:
     containers:
     - name: main
       image: nvcr.io/nvidia/ai-dynamo/vllm-runtime:1.6.0
       command: ["python3", "-m", "dynamo.vllm"]
       args:
       - --model
       - Qwen/Qwen3-0.6B
       - --disaggregation-mode
       - prefill
       - --kv-transfer-config
       - '{"kv_connector":"NixlConnector","kv_role":"kv_producer"}'
       - --kv-events-config
       - '{"publisher":"zmq","topic":"kv-events","endpoint":"tcp://*:20080","enable_kv_cache_events":true}'
       resources:
         limits:
           nvidia.com/gpu: "1"

The decode worker is the same with --disaggregation-mode decode and kv_role: kv_consumer, and without --kv-events-config, so only the prefill worker reports what is in its cache to the router. The frontend sets DYN_ROUTER_MODE=kv to turn on the KV-aware router.

$ kubectl apply -f 04-inference-cluster/dynamo-disagg.yaml
dynamographdeployment.nvidia.com/qwen3-disagg created
$ kubectl get dynamographdeployments
NAME           READY   BACKEND   AGE
qwen3-disagg   True              5d11h

It was ready about four minutes after the apply. What did the operator make out of that one object? For each of the three components it created a DynamoComponentDeployment, and from each of those a Deployment with one pod: qwen3-disagg-frontend, qwen3-disagg-prefill-0fac8979 and qwen3-disagg-decode-0fac8979. The suffix on the two workers is the first eight characters of a hash over both worker specs together (image, arguments, environment and resources count, replica counts don't), which is why prefill and decode carry the same one. A change to a worker's spec changes the hash, and the operator rolls the new workers out under the new name. The frontend got a Service, qwen3-disagg-frontend, on port 8000, which is where the port-forward in step 5 goes, and each worker got a Service on its system port, 9090, where its metrics live. Discovery runs through the Kubernetes API: the operator also made a ServiceAccount and a Role for the pods, each worker writes a DynamoWorkerMetadata object named after its pod when it starts, with its endpoints and model card inside, and the frontend watches those objects and the EndpointSlices to find workers that are ready. We will see the three pods in step 5, and that is the whole build.

Step 5: Let's See it Work

Now let's walk through the demo command by command. Typing vcluster connect for every command gets long, so the repo has make-kubeconfig.sh, which writes one kubeconfig with a short context for each cluster: factory for the control plane cluster, then team-chat, team-code, team-docs and inference. The team contexts use each tenant cluster's ClusterIP service, so they only work on machine 1.

$ ./05-demo/make-kubeconfig.sh
factory    ai-factory-1 Ready
team-chat  ai-factory-1 Ready
team-code  ai-factory-1 Ready
team-docs  ai-factory-1 Ready
inference  ai-factory-2 Ready
wrote /root/ai-factory-bare-metal/05-demo/demo.kubeconfig
$ export KUBECONFIG=$PWD/05-demo/demo.kubeconfig

That output already shows the layout: the control plane cluster and the three team clusters list ai-factory-1 as their node, and the inference cluster lists only ai-factory-2.

Every team has its own cluster

$ vcluster list
     NAME    | NAMESPACE | STATUS  | VERSION | CONNECTED |  AGE
 ------------+-----------+---------+---------+-----------+--------
   inference | inference | Running | 0.37.0  |           | 5d12h
   team-chat | team-chat | Running | 0.37.0  |           | 5d12h
   team-code | team-code | Running | 0.37.0  |           | 5d12h
   team-docs | team-docs | Running | 0.37.0  |           | 5d12h

09:41:39 info You also have 1 virtual clusters in your platform driver context.
09:41:39 info If you want to see them, run: 'vcluster list --driver platform' or 'vcluster use driver platform' to change the default

The last two lines are the CLI noticing that the inference cluster is also registered in vCluster Platform. Team chat sees only its own pods:

$ kubectl --context team-chat get pods -A
NAMESPACE     NAME                      READY   STATUS    RESTARTS   AGE
default       chat-5bd5486bf7-jxz22     1/1     Running   0          5d12h
kube-system   coredns-df8c87f55-t9npd   1/1     Running   0          5d12h

The control plane cluster sees the same pods under longer names, next to team-chat-0, the pod that runs team chat's control plane:

$ kubectl --context factory get pods -n team-chat
NAME                                                READY   STATUS    RESTARTS   AGE
chat-5bd5486bf7-jxz22-x-default-x-team-chat         1/1     Running   0          5d12h
coredns-df8c87f55-t9npd-x-kube-system-x-team-chat   1/1     Running   0          5d12h
team-chat-0                                         1/1     Running   0          5d12h

A team can install its own operators and CRDs, or break its own cluster, without touching the others. Their pods still run on the same machine, a shared node, which suits internal teams that trust each other.

Every team gets a portion of the GPU

One L4 with 23,034 MiB in portions: team-chat 7,000 MiB (vLLM uses 6,070), team-code 7,000 MiB (6,070), team-docs 5,000 MiB (4,420), 4,034 MiB free.

Inside team chat's pod, the GPU looks like a 7,000 MiB card. Team docs asked for 5,000 MiB and sees a 5,000 MiB card:

$ kubectl --context team-chat exec deploy/chat -- nvidia-smi --query-gpu=name,memory.total --format=csv
name, memory.total [MiB]
NVIDIA L4, 7000 MiB
[HAMI-core Msg(1163:124389193563968:multiprocess_memory_limit.c:862)]: Cleanup on exit for PID 1163
[HAMI-core Msg(1163:124389193563968:multiprocess_memory_limit.c:898)]: Exit cleanup complete for PID 1163
$ kubectl --context team-docs exec deploy/docs -- nvidia-smi --query-gpu=name,memory.total --format=csv
name, memory.total [MiB]
NVIDIA L4, 5000 MiB
[HAMI-core Msg(1147:140067551465280:multiprocess_memory_limit.c:862)]: Cleanup on exit for PID 1147
[HAMI-core Msg(1147:140067551465280:multiprocess_memory_limit.c:898)]: Exit cleanup complete for PID 1147

Those HAMI-core lines are a clue to how this works, and we will get to them in the next section. From the machine, there are three vLLM engines on one L4:

$ nvidia-smi
Fri Oct 30 09:41:42 2026
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 615.71.09              KMD Version: 615.71.09     CUDA UMD Version: 13.4     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA L4                      On  |   00000000:41:00.0 Off |                    0 |
| N/A   87C    P0             37W /   72W |   16579MiB /  23034MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A           41035      C   VLLM::EngineCore                       6070MiB |
|    0   N/A  N/A           41379      C   VLLM::EngineCore                       6070MiB |
|    0   N/A  N/A           41633      C   VLLM::EngineCore                       4420MiB |
+-----------------------------------------------------------------------------------------+

Why does each engine fit in its portion? vLLM sizes itself to the card it sees, and --gpu-memory-utilization=0.85 tells it to aim for 85% of that card. Its startup log shows what team chat's engine saw:

$ kubectl --context team-chat logs deploy/chat | grep "Desired GPU memory utilization"
(EngineCore pid=457) INFO 10-24 21:06:00 [gpu_worker.py:1034] Free memory on device (6.65/6.84 GiB) on startup. Desired GPU memory utilization is (0.85, 5.81 GiB). Actual usage is 3.21 GiB for consumed memory (weights + non-torch), 0.13 GiB for peak activation, and 0.0 GiB for CUDAGraph memory. Replace gpu_memory_utilization config with `--kv-cache-memory=2503861760` (2.33 GiB) to fit into requested memory, or `--kv-cache-memory=3409831424` (3.18 GiB) to fully utilize gpu memory. Current kv cache memory in use is 2.48 GiB.

The 6.84 GiB total is the 7,000 MiB portion (the whole card has 22.5 GiB), so vLLM aimed for 5.81 GiB. vLLM doesn't charge the memory its process used before it started measuring, such as the CUDA context, to that 85%, so its log reports a KV cache a little bigger than the target allows (2.48 GiB in use against 2.33 GiB), and the engine uses slightly more than 85%: nvidia-smi shows 6,070 MiB. That is still inside the 7,000 MiB portion, and team docs works the same way, with 4,420 of 5,000 MiB. Without portions, the first engine would aim for 85% of the whole card, and the second would refuse to start, because vLLM checks at startup that its share of the card is still free.

Look at the GPU-Util column too: 0%. Portions put three teams on one card instead of three cards, but the card is only as busy as the requests those teams send it.

How HAMi holds each team to its portion

HAMi's scheduler places the pod on a GPU with room for its portion. Inside the container, HAMi-core intercepts calls to the CUDA driver library and to NVML, shows the portion as the whole card, and refuses allocations past it.

HAMi works in two places:

  1. Scheduling. HAMi's scheduler only places a pod on a GPU that still has room for its portion, and it writes its choice on the pod: the GPU, 7,000 MiB of its memory, and 0 for compute, which means no compute limit.
  2. Every allocation. HAMi-core is a small library, libvgpu.so, that HAMi's device plugin mounts into the container and lists in /etc/ld.so.preload, so every process in the container loads it first. It intercepts calls to the CUDA driver library and to NVML, the library nvidia-smi reads. It shows the portion as the whole card, which is why nvidia-smi says 7000 MiB, and it checks every allocation against that portion. The HAMI-core lines from nvidia-smi above come from this library, cleaning up when the process exits.

$ kubectl --context factory get pods -n team-chat -l app=chat -o jsonpath='{.items[0].metadata.annotations.hami\.io/vgpu-devices-allocated}'; echo
GPU-73a98f24-e91d-fba5-74c3-8043018e4654,NVIDIA,7000,0:;

Inside the container, you can see how HAMi-core gets in and what it enforces:

$ kubectl --context team-chat exec deploy/chat -- cat /etc/ld.so.preload
/usr/local/vgpu/libvgpu.so
$ kubectl --context team-chat exec deploy/chat -- env | grep ^CUDA_DEVICE_
CUDA_DEVICE_MEMORY_LIMIT_0=7000m
CUDA_DEVICE_SM_LIMIT=0
CUDA_DEVICE_MEMORY_SHARED_CACHE=/usr/local/vgpu/f9718b61-69cf-40c5-b431-2312de7f2b4e.cache

CUDA_DEVICE_MEMORY_LIMIT_0 is the portion on the pod's first GPU, CUDA_DEVICE_SM_LIMIT=0 means no compute limit, and the shared cache file is where HAMi-core adds up what every process in the container has allocated.

What happens when a team goes past its portion? The repo has a test pod for that, over-the-limit.yaml. It asks for a 1,000 MiB portion, then allocates 600 MiB, then 1,000 MiB more:

     command: ["python3", "-c"]
     args:
       - |
         import torch
         free, total = torch.cuda.mem_get_info()
         print(f"this pod sees: {torch.cuda.get_device_name(0)}, {total // 2**20} MiB")
         a = torch.empty(600 * 2**20, dtype=torch.uint8, device="cuda")
         print("allocate 600 MiB: ok")
         try:
             b = torch.empty(1000 * 2**20, dtype=torch.uint8, device="cuda")
             print("allocate 1000 MiB more: ok, the limit was NOT enforced")
         except torch.OutOfMemoryError as e:
             print("allocate 1000 MiB more:", str(e).split(". ")[0] + ".", str(e).split(". ")[1] + ".")
     resources:
       limits:
         nvidia.com/gpu: 1
         nvidia.com/gpumem: 1000

Let's run it in team chat's tenant cluster:

$ kubectl --context team-chat apply -f 03-team-clusters/over-the-limit.yaml
pod/over-the-limit created
$ kubectl --context team-chat wait --for=jsonpath='{.status.phase}'=Succeeded pod/over-the-limit --timeout=3m
pod/over-the-limit condition met
$ kubectl --context team-chat logs over-the-limit
[HAMI-core ERROR (pid:1 thread=132318912436032 allocator.c:52)]: Device 0 OOM 1872756736 / 1048576000
[W1030 09:41:45.917487594 CUDACachingAllocator.cpp:3933] memory allocation failed with OOM on device 0 while trying to allocate 1048576000 bytes (free: 224395264, total: 1048576000).
[HAMI-core ERROR (pid:1 thread=132318912436032 allocator.c:52)]: Device 0 OOM 1872756736 / 1048576000
[W1030 09:41:45.917578076 CUDACachingAllocator.cpp:3933] memory allocation failed with OOM on device 0 while trying to allocate 1048576000 bytes (free: 224395264, total: 1048576000).
this pod sees: NVIDIA L4, 1000 MiB
allocate 600 MiB: ok
allocate 1000 MiB more: CUDA out of memory. Tried to allocate 1000.00 MiB.
$ kubectl --context team-chat delete pod over-the-limit
pod "over-the-limit" deleted from default namespace

Read the HAMi-core line from right to left: the portion is 1,048,576,000 bytes (1,000 MiB), and this allocation would have taken the pod to 1,872,756,736 bytes (1,786 MiB), so HAMi-core refused it. PyTorch agrees with HAMi about the card: it thinks the total is 1,000 MiB, with 214 MiB still free. The pod gets a normal CUDA out-of-memory error, the same one it would get on a real card with 1,000 MiB of memory, and the vLLM engines on the same GPU kept running.

Four endpoints, one API

Each team serves an OpenAI-compatible API. Each team's Service also shows up in the control plane cluster under the same longer name pattern as the pods, so its ClusterIP works from machine 1:

$ CHAT=http://$(kubectl --context factory get svc -n team-chat chat-x-default-x-team-chat -o jsonpath='{.spec.clusterIP}'):8000
$ CODE=http://$(kubectl --context factory get svc -n team-code code-x-default-x-team-code -o jsonpath='{.spec.clusterIP}'):8000
$ DOCS=http://$(kubectl --context factory get svc -n team-docs docs-x-default-x-team-docs -o jsonpath='{.spec.clusterIP}'):8000
$ echo $CHAT $CODE $DOCS
http://10.97.160.95:8000 http://10.99.152.242:8000 http://10.109.33.239:8000

Any OpenAI client works, curl included:

$ curl -s $CHAT/v1/chat/completions -H 'Content-Type: application/json' -d '{"model": "chat", "messages": [{"role": "user", "content": "What is a container ship? One sentence."}]}' | jq -r '.choices[0].message.content'
A container ship is a large maritime vessel designed to transport containers of goods using standard shipping containers.

For the rest of the demo, ask wraps a 27-line Python helper from the repo, which sends one request and prints the time and the token counts with the answer:

$ ask() { python3 05-demo/ask.py "$@"; }
$ ask $DOCS docs 'Explain Kubernetes in one sentence.'
0.65s  prompt=36 cached=None answer_tokens=44
Kubernetes is an open-source platform for managing and deploying containerized applications on a cluster of nodes. It provides orchestration, automation, and scalability capabilities to help organizations efficiently deploy, manage, and scale their applications.

cached=None is expected here: plain vLLM only reports cached tokens when it runs with --enable-prompt-tokens-details, and the team endpoints don't set it.

Machine 2 belongs to the inference cluster only

Three team tenant clusters run on ai-factory-1, the shared node of the control plane cluster. The inference tenant cluster runs on ai-factory-2, a private node the control plane cluster does not list.

$ kubectl --context inference get nodes -o custom-columns='NODE:.metadata.name,GPUS:.status.allocatable.nvidia\.com/gpu,VERSION:.status.nodeInfo.kubeletVersion'
NODE           GPUS   VERSION
ai-factory-2   2      v1.36.0
$ kubectl --context factory get nodes
NAME           STATUS   ROLES                  AGE     VERSION
ai-factory-1   Ready    control-plane,master   5d12h   v1.36.0
$ kubectl --context factory get pods -n inference -o wide
NAME          READY   STATUS    RESTARTS   AGE     IP            NODE           NOMINATED NODE   READINESS GATES
inference-0   1/1     Running   0          5d12h   10.244.0.33   ai-factory-1   <none>           <none>

The control plane cluster does not even list machine 2, yet the inference cluster's own control plane, inference-0, runs on machine 1 like the other three. The boundary here is the machine itself: no other tenant's pods can land on it, and the inference cluster has its own pod network and its own storage there.

Prefill on one GPU, decode on the other

$ kubectl --context inference get dynamographdeployments
NAME           READY   BACKEND   AGE
qwen3-disagg   True              5d11h
$ kubectl --context inference get pods
NAME                                             READY   STATUS    RESTARTS   AGE
qwen3-disagg-decode-0fac8979-7cd754ff4-wfb4g     1/1     Running   0          5d11h
qwen3-disagg-frontend-6597b955d4-28dht           1/1     Running   0          5d11h
qwen3-disagg-prefill-0fac8979-67f7d9f456-kwqgx   1/1     Running   0          5d11h

Disaggregated serving splits a request in two:

  • Prefill reads the whole prompt and builds the KV cache, and most of that work is compute.
  • Decode writes the answer one token at a time, and most of that work is reading memory.

Giving each its own GPU lets you size and scale them separately, and it keeps a long prefill from holding up the answers that are already being written. Here each worker owns a whole L4, and the PCI addresses show they are two different GPUs:

$ PREFILL=$(kubectl --context inference get deploy -o name | grep prefill)
$ DECODE=$(kubectl --context inference get deploy -o name | grep decode)
$ kubectl --context inference exec $PREFILL -- nvidia-smi --query-gpu=name,pci.bus_id,memory.total --format=csv
name, pci.bus_id, memory.total [MiB]
NVIDIA L4, 00000000:41:00.0, 23034 MiB
$ kubectl --context inference exec $DECODE -- nvidia-smi --query-gpu=name,pci.bus_id,memory.total --format=csv
name, pci.bus_id, memory.total [MiB]
NVIDIA L4, 00000000:01:00.0, 23034 MiB

One request, two GPUs

A request goes to the Dynamo frontend, then to the prefill worker on GPU 1; NIXL copies the KV cache to the decode worker on GPU 2. A short question took 24 ms of prefill and 164 ms of decode. The same 1,475-token prompt took 1.03 s the first time, 738 ms of it copying 171 MB of KV cache, and 0.28 s the second time.

Let's send it a question. The Dynamo frontend runs on machine 2, so reach it with a port-forward through the inference cluster's API server:

kubectl --context inference port-forward svc/qwen3-disagg-frontend 18000:8000 > /dev/null 2>&1 &

It is the same OpenAI API, with a different base URL:

$ INFERENCE=http://localhost:18000
$ ask $INFERENCE Qwen/Qwen3-0.6B 'What is a container ship? One sentence.'
0.23s  prompt=21 cached=16 answer_tokens=25
A container ship is a large, specialized vessel designed to carry and transport goods in bulk, often in a standardized format.

Qwen3-0.6B is a small model, and it shows: container ships carry containers, and bulk goes on bulk carriers. Which GPU did what? Both workers log every request with the same request id, so we can follow this one through them. Dynamo colours its log lines, so a small logs helper strips the colour codes first, and awk keeps the timestamp and the event:

$ logs() { kubectl --context inference logs "$1" --since=5m | sed 's/\x1b\[[0-9;]*m//g'; }
$ ID=$(logs $PREFILL | grep -o 'request received request_id=[0-9a-f-]*' | tail -1 | cut -d= -f2)
$ echo $ID
0a230c98-786e-4356-ad66-4af2f3ed57d9
$ logs $PREFILL | grep "request_id=$ID" | awk '{print $1, $5, $6}'
2026-10-30T09:45:33.150851Z request received
2026-10-30T09:45:33.174926Z request completed
$ logs $DECODE | grep "request_id=$ID" | awk '{print $1, $5, $6}'
2026-10-30T09:45:33.176109Z request received
2026-10-30T09:45:33.340476Z request completed

Prefill took 24 ms. Decode picked the request up 1 ms later, and it took 164 ms to pull the KV cache and write the 25-token answer. This question has been asked many times on this setup, so 16 of its 21 prompt tokens were already in the prefill worker's cache, which is the cached=16: Dynamo reports the prefill worker's cache hits in the response. The pull goes over NIXL, the NVIDIA Inference Xfer Library. vLLM's NixlConnector from the worker config uses it, and the decode worker reads the KV blocks from the prefill worker.

The same long prompt, twice

What changes with a longer prompt? LONG is a 1,475-token prompt about the Port of Singapore. It starts with a random number, so the first send never finds it in a cache. nixl reads two running totals from the decode worker's vLLM metrics: the time it has spent on NIXL transfers, and the bytes they moved.

$ LONG="Run $RANDOM$RANDOM. $(printf 'The Port of Singapore handled 44.66 million TEU in 2025, and every box has the same corners, so any crane can lift it. %.0s' {1..40}) Summarise this in one short sentence."
$ nixl() { kubectl --context inference exec $DECODE -- curl -s localhost:9090/metrics | grep -E '^vllm:nixl_(bytes_transferred|xfer_time_seconds)_sum' | sed 's/{.*}//'; }
$ nixl
vllm:nixl_xfer_time_seconds_sum 12.245364999999998
vllm:nixl_bytes_transferred_sum 2.970877952e+09

Now the same prompt twice, with nixl after each send:

$ ask $INFERENCE Qwen/Qwen3-0.6B "$LONG" 30
1.03s  prompt=1475 cached=0 answer_tokens=30
The Port of Singapore handled 44.66 million TEU in 2025, with every box having the same corners, allowing
$ nixl
vllm:nixl_xfer_time_seconds_sum 12.983065999999997
vllm:nixl_bytes_transferred_sum 3.141533696e+09
$ ask $INFERENCE Qwen/Qwen3-0.6B "$LONG" 30
0.28s  prompt=1475 cached=1472 answer_tokens=30
The Port of Singapore handled 44.66 million TEU in 2025, with every box having the same corners, allowing
$ nixl
vllm:nixl_xfer_time_seconds_sum 12.992545999999997
vllm:nixl_bytes_transferred_sum 3.143368704e+09

The second send took about a quarter of the time. Where did the time go? The worker logs have both requests:

$ logs $PREFILL | grep -E 'request (received|completed)' | tail -4 | awk '{print $1, $5, $6}'
2026-10-30T09:45:34.338138Z request received
2026-10-30T09:45:34.384769Z request completed
2026-10-30T09:45:35.886512Z request received
2026-10-30T09:45:35.913493Z request completed
$ logs $DECODE | grep -E 'request (received|completed)' | tail -4 | awk '{print $1, $5, $6}'
2026-10-30T09:45:34.385929Z request received
2026-10-30T09:45:35.328704Z request completed
2026-10-30T09:45:35.914438Z request received
2026-10-30T09:45:36.130996Z request completed

Put the logs and the nixl totals side by side:

First sendSecond send
Whole request (ask)1.03 s0.28 s
Prefill (prefill log)47 ms27 ms
Decode (decode log)943 ms217 ms
KV cache copied over NIXL171 MB in 738 ms1.8 MB in 9 ms

Prefill was never the slow part: it processed all 1,475 tokens in 47 ms. The first time, the decode worker had to copy the KV cache for the whole prompt from the prefill GPU, and NIXL reports that the copy took 738 ms of the decode worker's 943 ms. vLLM keeps the KV cache in blocks of 16 tokens by default, and Qwen3-0.6B needs 112 KiB per token (28 layers × 8 KV heads × 128 values × 2 for keys and values × 2 bytes), so the prompt's 93 blocks come to 171 MB. The second time, both workers already had the first 1,472 tokens, 92 full blocks, in their own prefix caches: vLLM's vllm:prefix_cache_hits_total counter goes up by 1,472 on each worker, and the cached=1472 in the response is the prefill worker's count. So prefill only had 3 new tokens to process, and decode copied only the last block, 1.8 MB in 9 ms, and spent the rest of its 217 ms writing the answer.

Dynamo's KV-aware router builds on the same caches. With more prefill workers, it sends each request to the prefill worker whose cache already holds the most of its prompt, which it learns from the KV events the prefill workers publish, weighed against how busy that worker is. It picks the decode worker on load alone. With one worker of each kind there is no choice to make here, so the faster second send comes from vLLM's prefix caches on the two workers.

Two choices, and they mix

A two by two grid. Columns: a shared node or its own private node. Rows: portions of a GPU with HAMi, or whole GPUs. Customers always get private nodes and can still use portions inside them.

The two parts of the demo answer the same two questions in different ways:

  • Whose machine? A shared node, where several tenant clusters run their pods, or a private node that belongs to one tenant cluster.
  • How do you cut the GPU? Portions with HAMi, or whole GPUs.

The answers mix at every size. Part 1 is a shared node with portions, which suits trusted internal teams for dev, test and CI. Part 2 is a private node with whole GPUs, which suits production inference and customers. A trusted team can get a whole GPU on a shared node, and a customer can cut its own GPUs into portions for its own apps. One rule holds everywhere: customers always get private nodes.

Sharp Edges

A few things to know before you copy this setup:

  • HAMi's portions are for teams that trust each other. HAMi enforces them with a library that it loads into every process in the container. HAMi's FAQ lists cases where the limit is not enforced, including a pod that sets CUDA_DISABLE_CONTROL=true and an app that calls the GPU driver directly instead of going through the CUDA library. An admission policy can block that variable, but it can't stop an app that talks to the driver directly, so customers get private nodes.
  • HAMi caps memory by default, not compute. nvidia.com/gpucores sets a container's share of the GPU's compute, but with the default core policy in HAMi 2.10.0 that limit never takes effect, a bug fixed after the release (HAMi-core#350). Set devices.nvidia.gpuCorePolicy: force in the chart values to enforce it, and test it on your workload.
  • The control plane machine runs tenant pods too. With joinNode on, the team pods share machine 1 with the vCluster control plane process and its credentials. vCluster's docs recommend joinNode.enabled: false and dedicated worker nodes for production.
  • Private Nodes need vCluster Platform. Part 2 does not run on the open-source build alone. The Free tier includes Private Nodes for up to 64 CPUs or 32 GPUs. How that cap counts these 128-thread servers was not tested, because the demo used an existing licensed Platform instance.
  • Splitting prefill and decode adds a copy. For the 1,475-token prompt, copying the KV cache took 738 ms, against 47 ms for prefill itself. That is about 230 MB/s, under 1% of the 64 GB/s NVIDIA rates the L4's PCIe Gen4 x16 interface for, so the bus is far from full. These L4s have no NVLink, and each worker pod sees only its own GPU, so how fast the copy goes depends on the backend and transport NIXL ends up using. Dynamo's own docs say disaggregation "is not automatically better": for small models, short prompts, low concurrency or clusters without a fast KV-transfer fabric, an aggregated deployment is simpler and often faster. This demo has all four, so read it as a demo of the pattern, and measure the copy with the nixl helper before you count on disaggregation for speed.
  • The Dynamo operator restarted 25 times in five and a half days. The first restart came on first boot, before the webhook certificate the operator writes for itself (no cert-manager needed) was in place. Its control plane is on machine 1, so renewing its leader lease crosses the network, and the last restart logged leader election lost after a timeout. The frontend and the two workers never restarted.
  • The first start is slow. The vLLM image is 9.2 GB and the Dynamo runtime image is 10.1 GB. Pulling the Dynamo image on machine 2 took 534 seconds here, so pull both ahead of time.

From two servers to an AI factory

The demo cut one corner on purpose: each team had its own base URL ($CHAT, $CODE, $DOCS and $INFERENCE). In production, you put a gateway in front:

Apps, IDEs and AI agents call one URL with their own key. The gateway checks the team, its quota, and the model field, then routes to the right inference cluster.
  • Everyone calls one URL, the same way every app calls the OpenAI API.
  • Each team and each agent gets its own key, and the key carries a quota.
  • The "model" field in the request picks the inference cluster. Body-based routing does this: a gateway extension copies the model name from the request body into a header, X-Gateway-Model-Name, and HTTPRoutes match on that header. It started in the Gateway API Inference Extension and now lives in llm-d's Inference Payload Processor.

Add metrics and a bill per team, self-service for new teams, and idle clusters that sleep so their GPUs go back to the pool, and you have the rest of an AI factory. vCluster Platform adds self-service through projects and templates, and cost dashboards, on top of the tenant clusters. Its auto sleep, on the paid tiers, covers tenant clusters on shared nodes.

The same pattern already runs at a much larger size. Deutsche Telekom's Industrial AI Cloud uses vCluster with NVIDIA DSX OS components to give each customer its own private AI cloud.

Try it yourself

Everything above is in saiyam1814/ai-factory-bare-metal, along with the things that broke along the way:

  • 01-control-plane-cluster/: the vCluster Standalone config
  • 02-hami/: HAMi values
  • 03-team-clusters/: the three vLLM deployments and the over-the-limit test pod
  • 04-inference-cluster/: the private-node tenant cluster and the Dynamo deployment
  • 05-demo/: demo.sh, ask.py and make-kubeconfig.sh

demo.sh runs step 5 as a guided walk-through: every command waits for Enter, so you set the pace, and part 2 starts and stops the port-forward for you.

./05-demo/demo.sh      # both parts; ./05-demo/demo.sh 1 or ./05-demo/demo.sh 2 for one part

To clean up, delete the four tenant clusters. This is the one command in the post that was not run, because the setup was still in use when the post was written:

for c in team-chat team-code team-docs inference; do vcluster delete $c -n $c; done

Wrapping up

So, will everyone build an AI factory? I think yes, and only the size changes: one GPU on a desk, a rack for the company, a container, or a whole AI Cloud. At every size the same two choices come back, whose machine and how to cut the GPU, and two bare-metal servers were enough to show both. My pick for most companies: start internal teams on shared nodes with HAMi portions, and give anything customer-facing private nodes from day one.

Huge thanks to the HAMi, vLLM and NVIDIA Dynamo maintainers. This demo is mostly their work, wired together with vCluster. Give it a try on a GPU machine you already have, and let me know how it goes on X, where I am @SaiyamPathak.

Links

Share:
Get started with the
#1 platform for AI infra.

Trusted by today’s fastest-growing AI cloud builders.

Ready to take vCluster for a spin?

Deploy your first tenant cluster today.