A vLLM pod can fail in two ways before it answers a single request. If no node advertises a GPU resource, the scheduler has nowhere to put the pod. If the pod does start, a liveness probe written for a web service can kill it while it is still loading the model. This article covers the Kubernetes configuration that prevents both, and the monitoring that tells you whether callers are still getting usable answers from the model.
AI-generated
The article does not include a vLLM launch command, its flags, its image, its port, its health endpoint or its metric names. I have not checked those against vLLM's documentation for this piece. The manifest below takes those four values as variables, and you fill them from the vLLM docs for the release you run. Everything else here comes from the Kubernetes and Prometheus documentation, or from systems I have written about on this site.
Serving models with vLLM in one paragraph
From the platform side, serving a model with vLLM means running a long-lived, online-serving workload. It needs a GPU, it is slow to become ready, and it must not receive traffic until it is ready. In the run shapes I described in my guide to LLMOps and MLOps (opens in a new tab), it is the "online serving" case: you care about requests, errors and latency, measured on both the server and the client side. The cluster has to do three things for it:
- Place it on a node that actually has a GPU.
- Wait for it to load without killing it.
- Keep it out of the Service until it can answer.
The callers have one more job: count the answers they cannot use, because an HTTP 200 does not mean the model helped.
How it works
The lifecycle of one model-server pod
My LLMOps guide already draws the full model lifecycle, from data to monitoring. This diagram zooms into its "deploy" and "run" boxes for a single GPU-backed pod. Each transition is something Kubernetes enforces.
flowchart TD
A["Deployment created or rolled out"] --> B{"Node with nvidia.com/gpu allocatable and matching nodeSelector?"}
B -->|no| P["Pod stays unscheduled"]
B -->|yes| C["Container starts, model loads"]
C --> D{"startupProbe passes within failureThreshold x periodSeconds?"}
D -->|no| K["Container killed, restarted per restartPolicy"]
K --> C
D -->|yes| E["livenessProbe and readinessProbe take over"]
E --> F{"readinessProbe passing?"}
F -->|no| G["Pod removed from Service endpoints, no traffic"]
G --> F
F -->|yes| H["Serving traffic through the Service"]
H --> M["Monitored: probes, restarts, caller-side outcomes"]
M -->|new model or image| AGetting a GPU into the pod
Kubernetes does not know about GPUs on its own. According to the Kubernetes GPU scheduling page (opens in a new tab) (stable since v1.26), the setup works like this:
- A cluster admin installs the vendor's GPU drivers on the nodes.
- The admin runs the vendor's device plugin.
- The device plugin makes the node advertise a custom resource, such as
nvidia.com/gpuoramd.com/gpu. - A pod asks for that resource by name, and the scheduler only places it on a node that has one free.
GPUs follow stricter rules than CPU and memory. They go in limits:
| What you write | Result |
|---|---|
limits only | Allowed; the limit is also used as the request |
requests and limits, equal | Allowed |
requests without limits | Not allowed |
If your nodes have different GPU types, label them and select on the label. The Kubernetes page uses this example. The key accelerator is only a convention, not a reserved name:
kubectl label nodes node1 accelerator=example-gpu-x100Node Feature Discovery (NFD) can apply such labels automatically, but it needs the vendor's NFD plugin. It can also taint GPU nodes, and a tainted node only accepts pods that tolerate the taint.
Before writing any manifest, check that the resource exists at all:
kubectl get nodes -o custom-columns='NAME:.metadata.name,GPU:.status.allocatable.nvidia\.com/gpu'A node without the driver or the device plugin will not report the resource. No manifest can fix that.
Waiting for a slow start
Model servers load weights before they can answer, and that can take minutes. The probes page (opens in a new tab) gives three probes with distinct jobs:
startupProbeprotects a slow first start. Once it has succeeded, the liveness probe takes over, and the page names astartupProbeas one way to delay readiness probes. It getsfailureThreshold × periodSecondsto pass. If it never passes, the container is killed and handled perrestartPolicy.livenessProbetakes over after startup and restarts a container that stops responding.readinessProberuns for the container's whole life. While it fails, the pod receives no traffic through Services.
The page also warns that readiness and liveness do not wait for each other. A readiness probe does not delay anything by itself; to delay it, use initialDelaySeconds or a startupProbe. HTTP probes count any status from 200 up to 399 as success. Read the field reference on your own cluster:
kubectl explain pod.spec.containers.startupProbeA worked example
The example is one vLLM replica on one GPU behind a ClusterIP Service, plus the caller-side metrics that show whether it is being used.
Step 1: decide the four values that come from vLLM
The manifest uses four environment variables, rendered with envsubst:
| Variable | What it is | Where it comes from |
|---|---|---|
VLLM_IMAGE | Container image and tag | vLLM documentation for your release |
VLLM_ARGS_JSON | Container args as a JSON array, including the model | vLLM documentation |
VLLM_PORT | Port the server listens on | vLLM documentation, or the arg that sets it |
VLLM_HEALTH_PATH | HTTP path that returns 2xx/3xx when the server can answer | vLLM documentation |
The last value matters most. Do not assume /healthz, which is only the path in the Kubernetes example. If the path you choose returns success before the model is loaded, all three probes pass early, and the Service sends traffic to a server that cannot answer yet.
Step 2: the deployment
# vllm-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: vllm
labels:
app: vllm
spec:
replicas: 1
selector:
matchLabels:
app: vllm
template:
metadata:
labels:
app: vllm
spec:
nodeSelector:
accelerator: example-gpu-x100
containers:
- name: vllm
image: ${VLLM_IMAGE}
args: ${VLLM_ARGS_JSON}
ports:
- name: http
containerPort: ${VLLM_PORT}
resources:
limits:
nvidia.com/gpu: 1
startupProbe:
httpGet:
path: ${VLLM_HEALTH_PATH}
port: http
failureThreshold: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: ${VLLM_HEALTH_PATH}
port: http
periodSeconds: 10
livenessProbe:
httpGet:
path: ${VLLM_HEALTH_PATH}
port: http
failureThreshold: 1
periodSeconds: 10
---
apiVersion: v1
kind: Service
metadata:
name: vllm
spec:
selector:
app: vllm
ports:
- name: http
port: 80
targetPort: httpThree choices in this manifest are deliberate:
- The GPU appears only under
limits. That alone gives a request of one GPU, and it avoids the rejected "request without limit" case. - The probes use the named port
http. OnlycontainerPortneeds the number, so changing the port is a one-line change. failureThreshold: 30×periodSeconds: 10gives a 300-second startup budget. That is the Kubernetes example. Replace it with your measured worst-case load time plus headroom, as covered in step 4.
Step 3: render and validate before applying
Export the four variables, then let the API server validate the result without creating anything:
envsubst < vllm-deployment.yaml | kubectl apply --dry-run=server -f -A server-side dry run catches a GPU requests entry without a matching limit, a non-numeric port, and malformed args. When it passes, apply for real by dropping --dry-run=server. Then watch the pod go through the lifecycle above:
kubectl get pods -l app=vllm -wWhile the startup probe is still failing, the pod reports not ready. If it is restarted before it ever becomes ready, your startup budget is shorter than the load time. If it stays unscheduled, go back to the node check: either no node advertises nvidia.com/gpu, or none carries the accelerator label.
Step 4: size the startup budget from a measurement
Time a real start on the node type you will run on: from the container starting to the health path first returning success. Then set failureThreshold so that failureThreshold × periodSeconds covers the slowest start you saw, with room to spare. Measure on the GPU type you will actually use, because load time depends on the node.
Step 5: monitor from the caller, not just the server
Probes tell you the server is up. They do not tell you the product is working. In my LLMOps guide, the system I reviewed had every model call succeed while every report fell back to rules. The service that calls vLLM should therefore count outcomes with one labelled counter, and count unusable separately from error. The metric rules are in that article, so I will not repeat them. The queries for a vLLM backend look like this:
# Share of calls to the vLLM backend that did not produce a usable answer, over 5 minutes
sum(rate(llm_requests_total{provider="vllm", outcome!="ok"}[5m]))
/
sum(rate(llm_requests_total{provider="vllm"}[5m]))
# Seconds since the caller last got a usable answer from vLLM
time() - llm_last_usable_answer_timestamp_seconds{provider="vllm"}The provider and model label values must come from configuration, never from request data, so the label set stays bounded. vLLM also exports metrics of its own, but I have not verified their names for this article, so they are not in these queries.
Trade-offs and pitfalls
Kubernetes will happily kill a model that is loading
A liveness probe with no startup probe in front of it starts checking as soon as the container runs. On a model server, a probe sized for a web app restarts the container before it finishes loading, and the next start fails the same way. The startupProbe exists for this case. The opposite mistake is a budget that is far too long: a process that hangs during load holds the GPU until the full budget runs out.
failureThreshold: 1 on liveness is strict
The Kubernetes example uses one failure, so a single slow or failed health check restarts the container. For a server that has to reload weights after every restart, one missed probe under load costs a full cold start. It also takes the replica out of service for that time. Decide on that number knowing what a restart costs you.
Readiness is your rollout gate
Because a not-ready pod receives no Service traffic, the readiness probe decides when a new replica starts taking requests during a rollout. Everything therefore depends on VLLM_HEALTH_PATH meaning "can answer a request", not "process is up". With a single replica and a single GPU, a rolling update may also have no free GPU to start the new pod on. Check that before relying on rolling updates.
GPU resource rules are strict, and errors look like scheduling problems
requests without limits is rejected, and unequal values are not allowed. Missing drivers or a missing device plugin produce a different symptom: the resource never appears on the node, so the pod waits with nowhere to go. If NFD taints your GPU nodes, the pod also needs a matching toleration.
The caller still needs timeouts and admission control
A self-hosted model server moves cost from tokens to GPUs, but slow generations and overload still reach the caller. When I built the RoboShop AI gateway (opens in a new tab) in front of a Bedrock or Ollama backend, three patterns made the difference:
- Nested time budgets, where each inner layer gives up first.
- No retry on the generation
POST, because a retry pays for a second generation. - A separate 429 for "busy" and 503 for "broken".
The same patterns apply when the backend is vLLM.
When vLLM is the wrong tool
If you have no GPUs, this whole setup does not apply. My CPU-only RAG platform on k3s (opens in a new tab) runs embeddings and search without one. If request volume is low, or you do not want to run GPU nodes, a hosted provider removes the scheduling and probe work. You keep the caller-side monitoring either way.
Further reading
- Schedule GPUs (opens in a new tab): device plugins, the
limitsrule, node labels and NFD. - Configure liveness, readiness and startup probes (opens in a new tab): probe fields, the startup budget and how readiness gates traffic.
- Prometheus instrumentation practices (opens in a new tab): the online-serving metrics and labelling rules behind step 5.
- vLLM's official documentation and release notes for your version: the image, args, port, health endpoint and exported metrics that this article leaves as variables.
Your next step: run the node check above on your cluster. If no node reports nvidia.com/gpu, sort out the driver and device plugin first. Then take the four vLLM values from the docs for the release you run, and time one real cold start before you set failureThreshold.



Discussion comments
No comments yet. Start the discussion.