Training a language model is a one-off cost. Serving it is a bill that arrives every day. A model loaded naively handles one request at a time, leaves the GPU half idle and runs out of memory when two long prompts arrive together. vLLM is the server that fixes this part of the problem. It loads the model onto one or more GPUs, schedules many requests together so the GPU stays busy, and answers through an API that follows the OpenAI format, so existing client code works by changing one URL. The CNCF Landscape lists it under Inference › Runtime with the description “vLLM is a fast and easy-to-use library for LLM inference and serving.” It is a NON CNCF tool. The earlier KServe brief shows it as one of the runtimes KServe can run; this brief covers vLLM itself.
CNCF daily · Sprint 6, post 20 of 26 · Inference (Runtime) · NON CNCF
At a glance
| Category | Inference › Runtime (Landscape) |
| CNCF status | NON CNCF, listed in the CNCF Landscape |
| Repository | github.com/vllm-project/vllm; docs at docs.vllm.ai |
| Interface | vllm serve <model> starts an HTTP server; the container image vllm/vllm-openai does the same |
| API | OpenAI-compatible chat and completion endpoints, on port 8000 in the Kubernetes docs |
| Hardware | NVIDIA and AMD GPUs are shown in the Kubernetes guide; the guide also has a CPU example for demos only |
| Kubernetes options | Native Deployment and Service, Helm, KServe, LeaderWorkerSet and several community projects, per the docs list |
| Model source | Hugging Face by default, using a token for gated models; weights can also come from a volume |
| Version | The docs site has versioned pages up to 0.32.0 and a “latest” page; I did not confirm the current release, so pin the version you test |
The problem vLLM solves
| Question | A plain model loader | vLLM |
|---|---|---|
| Many users at once | One request at a time, or memory errors | Requests are batched and scheduled together |
| GPU use | Idle between requests | Kept busy by continuous batching |
| Client code | Custom API for each model | OpenAI-style API, so existing SDKs work |
| Long prompts | Memory runs out | Memory for the attention cache is managed in blocks |
| Streaming | Wait for the full answer | Tokens stream as they are produced |
| Running on Kubernetes | Build it yourself | Documented Deployment, Helm and KServe paths |
Key concepts
| Term | Meaning |
|---|---|
| Prefill | The first phase: the model reads the whole prompt |
| Decode | The second phase: the model produces the answer one token at a time |
| KV cache | Memory that stores what the model has already read, reused while decoding |
| Continuous batching | New requests join a running batch instead of waiting for it to finish |
| Tensor parallelism | Splitting one model across several GPUs |
| OpenAI-compatible server | The same request and response shape as the OpenAI API |
| Gated model | A model that needs an access token to download |
| Served model name | The name clients put in the model field |
Architecture
Blue is the agent and traces, grey is the gateway, KServe and the GPU node and teal is the model server and its weights. Open the zoomable diagram, or download it as SVG or PNG.
| Component | Responsibility |
|---|---|
| Copilot agent | Builds the prompt and calls the model through the gateway. |
| agentgateway | Authentication, rate limits and routing in front of the model. It is covered in its own brief later in this sprint. |
| vLLM server | Loads the model, batches requests, and answers on the OpenAI-style API. |
| KServe | Deploys the server as an InferenceService and scales it. See the KServe brief. |
| MatrixHub | Supplies model weights by version. See the MatrixHub brief. |
| GPU node | The hardware; Karpenter can add it when a pod is Pending. |
| Tracing | Records latency and token counts for each call. |
One request
- Accept. A chat completion request arrives.
- Schedule. It joins the queue and is batched with others.
- Cache. Prefill reads the prompt and fills the KV cache.
- Tokens. Decode produces the answer one token at a time.
- Record. Tokens stream back and metrics are recorded.
Open the zoomable flow diagram, or download it as SVG or PNG.
Real world: the month-end rush on the copilot
At month end, a hundred finance users ask the ERP copilot to explain variances at the same time. With a simple model loader, each request waits for the one before it, and answers take minutes. With vLLM, requests join a running batch, the first tokens appear within seconds, and the GPU stays busy instead of idle between turns. The team watches queue time and tokens per second, and adds a second replica when the queue grows. The agent code does not change, because it still talks to an OpenAI-style endpoint.
Install vLLM on Kubernetes
These steps follow the vLLM Kubernetes guide. I did not run them for this post.
The docs describe three parts: a PVC to cache downloaded models, a Secret with a Hugging Face token (needed only for gated models), and a Deployment plus Service. The guide’s CPU example is for demonstration only and says its performance will not match GPUs.
# vllm.yaml: trimmed from the docs example; adapt the image, model and resources
apiVersion: apps/v1
kind: Deployment
metadata:
name: vllm-server
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: vllm
template:
metadata:
labels:
app.kubernetes.io/name: vllm
spec:
containers:
- name: vllm
image: vllm/vllm-openai:<pinned-tag> # the docs show :latest; pin a tag instead
command: ["/bin/sh", "-c"]
args: ["vllm serve meta-llama/Llama-3.2-1B-Instruct"]
env:
- name: HF_TOKEN
valueFrom:
secretKeyRef:
name: hf-token-secret
key: token
ports:
- containerPort: 8000
resources:
limits:
nvidia.com/gpu: 1 # GPU request; not in the CPU example
volumeMounts:
- name: llama-storage
mountPath: /root/.cache/huggingface
volumes:
- name: llama-storage
persistentVolumeClaim:
claimName: vllm-models
---
apiVersion: v1
kind: Service
metadata:
name: vllm-server
spec:
selector:
app.kubernetes.io/name: vllm
ports:
- protocol: TCP
port: 8000
targetPort: 8000
type: ClusterIP
kubectl apply -f vllm.yaml
kubectl logs -l app.kubernetes.io/name=vllm # first start downloads the model, which can take minutes
# expect lines ending in "Application startup complete." and "Uvicorn running on http://0.0.0.0:8000"
On a cluster that has KServe, the docs list KServe as another way to run vLLM; follow the KServe runtime route from the earlier brief.
Try it
kubectl port-forward svc/vllm-server 8000:8000 &
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "meta-llama/Llama-3.2-1B-Instruct",
"messages": [{"role": "user", "content": "Explain accounts payable in one sentence."}],
"max_tokens": 60
}'
The model name must match the model the server was started with. The older Kubernetes docs show the same style of curl test with max_tokens and temperature.
Production reference design
- Pin everything. Pin the image tag and the model revision, not
latest, and keep them in Git. - Weights from your registry. Pull weights from MatrixHub into a volume, so startup does not depend on the public internet.
- Right-size the GPU. The model plus its KV cache must fit in GPU memory; test with real prompt lengths and your concurrency.
- Probes. Use readiness probes, because model loading takes time; do not send traffic until the server is ready.
- Scale on queue, not CPU. Watch queue depth and latency, and scale replicas on those; with KServe, use its autoscaling options.
- Gateway in front. Put authentication and rate limits in the gateway, not in each client.
- Dedicated GPU nodes. Taint GPU nodes and let Karpenter add them, so non-GPU pods do not occupy them.
- Warm capacity. Keep at least one replica running if cold start is too slow for users.
- Observability. Collect the server’s metrics and traces; track time to first token and tokens per second.
- Load-test before launch. Test with your longest prompts at peak concurrency.
Security
- The endpoint is powerful. An unauthenticated model server lets anyone spend your GPU; keep it as a ClusterIP behind the gateway.
- Model tokens. Keep the Hugging Face token in a Secret with narrow access, and prefer an internal registry.
- Model provenance. Weights are code-adjacent files; pull from a trusted source and check hashes where available.
- Prompt and data leakage. Logs and traces can contain prompts and answers; control who can read them.
- Network policy. Allow only the gateway to reach the server, and limit its outbound access.
- Image supply chain. Pin and scan the server image, and mirror it into your registry.
- Prompt injection. The server will do what the prompt says; guard inputs and outputs at the application layer.
Troubleshooting
This table comes from the vLLM Kubernetes guide and common GPU serving problems. I did not run vLLM for this post, so verify each entry on your cluster.
| Symptom | Likely cause | How to check | Fix |
|---|---|---|---|
| Pod Pending | No GPU node available | kubectl describe pod |
Add a GPU node, or fix the GPU resource request and tolerations |
| Pod starts, then restarts | Not enough GPU memory for the model | kubectl logs --previous |
Use a smaller model or more GPUs, or lower the context length |
| Long time before ready | The model is downloading | kubectl logs -l app.kubernetes.io/name=vllm |
Use a PVC cache or pre-pulled weights; the docs note it can take a couple of minutes |
| 401 or access error on download | Gated model without a token | Logs | Create the hf-token-secret and reference it |
| Client gets “model not found” | The model name does not match |
Compare the request with the server’s start command | Use the same name, or set a served model name |
| Requests time out under load | Queue is long, or one replica | Server metrics and logs | Add replicas, shorten max_tokens, or use a smaller model |
| Out-of-memory on long prompts | Context and cache exceed memory | Logs at the failing request | Lower the maximum length or concurrency |
| Cannot reach the service | Service or selector wrong | kubectl get endpoints vllm-server |
Match the label app.kubernetes.io/name: vllm |
| Very slow answers on CPU | CPU image is for demos | Image name | Use GPU nodes for anything real |
| Rolling update drops requests | New pod not ready yet | Rollout status | Add readiness probes and a longer termination grace period |
Usage cases
- Chat and copilots. An OpenAI-style endpoint for internal assistants.
- Batch jobs. Summarising or classifying many documents on a shared GPU.
- Evaluation runs. A local judge model for DeepEval tests.
- Retrieval answers. The answer step in a RAG pipeline after retrieval from the vector store.
- In the Sprint 6 project. The ERP copilot’s model call goes to vLLM, run through KServe on Karpenter GPU nodes, with weights from MatrixHub.
Operational considerations
- GPU cost dominates. Measure tokens per second per dollar, and consider smaller or quantised models where quality allows.
- Fast-moving project. The docs show many versions in a short time; pin versions, read release notes and test upgrades.
- Hardware support. Check that your GPU model and driver are supported by the version you choose.
- Cold starts. Loading a large model takes time; keep warm replicas or pre-pull weights.
- Capacity planning. Concurrency, prompt length and output length decide how many GPUs you need; test rather than guess.
- Not CNCF. It is a community open source project; check its licence and governance for your needs.
Adoption
The vLLM docs list KServe, Helm, LeaderWorkerSet and several community projects as ways to deploy it on Kubernetes, and the KServe brief shows vLLM among its runtimes. I did not verify named end users for this post, so none are listed.
Alternatives
| Solution | Model | Best suited to |
|---|---|---|
| Hugging Face Text Generation Inference | Model server from Hugging Face | Teams in the Hugging Face ecosystem |
| NVIDIA Triton with TensorRT-LLM | NVIDIA’s serving stack | NVIDIA-only fleets that want maximum tuned performance |
| SGLang | Serving framework with a structured-generation focus | Workloads with many shared prefixes or structured output |
| llama.cpp or Ollama | Lightweight local runtimes | Laptops, edge devices and small CPU-based setups |
| Managed model APIs | Hosted models from providers | Teams that do not want to run GPUs |
| KServe runtimes | A platform that can run several of the above | Teams that want one serving API across models |
Strengths and limitations
| Strengths | Limitations |
|---|---|
| High throughput through continuous batching | Needs GPUs and careful memory planning |
| OpenAI-compatible API, so clients are easy to switch | Fast release pace needs version pinning |
| Documented Kubernetes, Helm and KServe paths | Not a CNCF project |
| Streaming responses | Cold starts for large models |
| Supports several GPU vendors | Not every model or hardware combination is supported at once |
| Large community and many integrations | You still own scaling, security and cost control |
Recommendation
Adopt as the model server for self-hosted language models. For the ERP copilot, run vLLM through KServe on GPU nodes that Karpenter manages, with weights pulled from MatrixHub, the endpoint reachable only through agentgateway, and tracing on every call. Start with a small model and a single replica, load-test with real prompts, then size GPUs from the measured queue and token rates. If you only need occasional answers, a managed model API is simpler and cheaper than running GPUs.
References: vLLM documentation · vLLM: Using Kubernetes · vLLM Kubernetes guide (stable) · vLLM repository · CNCF Landscape

