vLLM on Kubernetes for Teams: Autoscaling, Queuing and Cost Control
vLLM on Kubernetes for teams: deploy as a Deployment behind a Service, autoscale on queue depth and control GPU cost. A six-step tutorial for teams.
By Galactic News Editorial · Published 2026-11-23T16:32:00+00:00 · Updated 2026-11-23T16:32:00+00:00
vLLM on Kubernetes for Teams: Autoscaling, Queuing and Cost Control
vLLM on Kubernetes for teams turns a single GPU server into a shared inference service. This tutorial deploys vLLM as a Kubernetes Deployment behind a Service, autoscales it on queue depth, and controls cost. It is written for platform engineers who know Kubernetes and are new to LLM serving. The goal is a resilient service other teams can call, that scales when traffic arrives and does not waste the most expensive hardware in the cluster.
The vLLM Kubernetes teams autoscaling design
Serve vLLM as a Deployment behind a Service. Keep replica count and node count as two independent levers. The Deployment owns the vLLM pods. The Service owns request distribution. The autoscaler owns capacity. This separation is the core design decision, and everything else follows from it.
vLLM exposes an OpenAI-compatible HTTP API on port 8000. It serves /v1/chat/completions, /v1/completions and /v1/models. It also exposes a liveness and readiness path at /health and a Prometheus scrape path at /metrics. One pod loads one model and shards it across its GPUs with tensor parallelism. The autoscaler adds or removes whole pods, never fractions of a pod.
The alternatives solve specific problems. Use a StatefulSet when replicas need stable identity and their own persistent volume for the model cache. Use a LeaderWorkerSet when a single replica must span several pods for multi-node inference. Use a serving layer such as KServe when you would rather manage an InferenceService than raw manifests. For most teams, the plain Deployment is the right start.
vLLM's core engine features matter here. Continuous batching packs in-flight requests together. PagedAttention cuts KV-cache memory waste, which lets one GPU hold larger batches and serve more throughput. These are vLLM's job. The cluster wiring is yours.
Deploy vLLM on Kubernetes in six steps
- Prepare the GPU nodes. Install the NVIDIA GPU Operator with Helm. It manages the driver, the container toolkit, the device plugin that advertises nvidia.com/gpu, and the DCGM metrics exporter. Confirm the nodes report GPUs with kubectl get nodes. Versions current as of October 2026 include vLLM v0.32.0, GPU Operator v26.7.2 and KEDA v2.21.0.
- Create a namespace, a model cache volume and a token secret. Make a PersistentVolumeClaim for the Hugging Face model cache so pods do not re-download weights on every restart. Store the Hugging Face token as a Kubernetes secret for gated models.
- Deploy vLLM as a Deployment. Pin the image tag, never latest. Use vllm serve with your model, for example vllm/vllm-openai:v0.32.0 serving a small model first. Set tensor-parallel-size to match the GPU count in the pod. Request nvidia.com/gpu as a limit. Use the Recreate strategy so a rollout frees the GPU and the ReadWriteOnce volume before starting the new pod.
- Add probes that respect slow model loads. A model can take minutes to download and load. Use a startupProbe with a long failure threshold so the liveness probe does not kill the pod mid-load. Point readiness at /health so the Service only sends traffic to pods that can answer.
- Expose the Service and test it. Create a ClusterIP Service on port 8000. Port-forward it and send a request to /v1/models, then a chat completion. Confirm the response before adding autoscaling.
- Wire autoscaling on queue depth. Scrape /metrics with Prometheus. Feed vllm:num_requests_waiting into the autoscaler through KEDA or the Prometheus adapter. Scale replicas when requests start queuing, not when the GPU looks busy.
The official vLLM production stack offers a faster path. It is an officially released codebase under the vLLM project, installed with a Helm chart. It adds a request router and Grafana dashboards on top of the same Deployment pattern. It suits teams that want the standard setup without writing every manifest by hand.
Queuing and the right autoscale signal
GPU utilisation is a poor autoscale trigger for LLM serving. A saturated engine can read 100 percent utilisation while latency is fine. A quiet engine can read low utilisation while the queue backs up. The metric that tracks the user-visible backlog is vllm:num_requests_waiting, the queue depth. Autoscale on that.
vLLM emits time-to-first-token and time-per-token latency histograms at /metrics. Use them to set service level objectives and burn-rate alerts. A rising queue with stable latency means the engine is absorbing the load. A rising queue with rising time-to-first-token means you need another replica.
Plan for cold starts. vLLM pods cannot scale to zero. An 8B model takes 30 to 90 seconds to load. Keep at least one replica warm. Scale up early, before the queue grows, and scale down slowly so a brief dip does not strand requests. If your traffic is very bursty with long idle gaps, a serverless GPU platform may cost less than a cluster that idles.
Cost control for teams
| Lever | What it does | Trade-off |
|---|---|---|
| Right-size the model | Serve the smallest model that meets quality needs | Smaller models answer worse on hard tasks |
| Cache weights on a PVC | Pods restart without re-downloading weights | Storage cost and volume management |
| Autoscale on queue depth | Replicas match real demand | Cold starts of 30 to 90 seconds per replica |
| Set gpu-memory-utilization | Controls how much GPU memory vLLM claims | Too low wastes memory, too high risks OOM |
| Share one service across teams | One deployment serves many callers | Needs quotas and per-team rate limits |
| Use spot or preemptible GPU nodes | Cheaper capacity for fault-tolerant workloads | Nodes can disappear mid-request |
Track cost per million tokens, not cost per GPU hour. A GPU that serves twice the tokens at the same hourly price is half the cost. Watch the metrics: requests waiting, time-to-first-token, tokens per second and GPU memory use. Review them weekly with the teams that call the service.
Failure modes to plan for
Pods die. Nodes drain. Models fail to load. Plan for each. The Deployment restarts failed pods. The Service routes around unready ones. The startupProbe protects slow loads. Keep the model cache on a persistent volume so a restart is fast. Pin the image tag and the model revision so a redeploy cannot silently change the model. Test a node drain before production traffic depends on it.
Protect the service from its callers. Add per-team quotas and rate limits at the gateway. A single runaway client can fill the queue for everyone. Log which team sent each request so you can find the noisy neighbour fast.
Bottom line
Deploy vLLM as a Deployment behind a Service, pin the image and the model, probe /health with a generous startup window, and autoscale on queue depth with KEDA or an HPA. Start with one model and one replica, measure the real queue and latency, then scale. The cluster wiring is simple. The discipline of measuring the right signals is what makes it production-ready.