vLLM on KServe with KEDA
Serve a vLLM model through KServe in Standard (raw Deployment) mode and scale its replicas with KEDA from vLLM's own Prometheus metrics. Ends with a Ready service, a generated ScaledObject and a load test that proves scale-out and scale-in.
Scope: this combination only. Engine flags live in the vllm skill, KServe internals in kserve, KEDA internals in keda.
Work through the steps in order. Load a reference only when a step names it.
Discover first
Inspect the live system before changing anything. Every command is read-only and never prints secrets.
kubectl version -o json | jq -r '.serverVersion.gitVersion' # KServe v0.21 needs 1.32+
kubectl get crd | grep -E 'serving.kserve.io|keda.sh|gateway.networking'
kubectl get deploy -A | grep -Ei 'kserve|keda|cert-manager|prometheus'
kubectl get clusterservingruntimes.serving.kserve.io 2>/dev/null
kubectl get cm inferenceservice-config -n kserve -o json 2>/dev/null \
| jq -r '.data.deploy' # defaultDeploymentMode
kubectl get nodes -o json | jq -r '.items[] | [.metadata.name, (.status.allocatable["nvidia.com/gpu"] // "0")] | @tsv'
helm list -A | grep -Ei 'kserve|keda'
Decision flow
- No KServe or KEDA -> install both, in Standard mode:
references/install.md.
- Pre-existing KServe in Knative (Serverless) mode -> KEDA needs Standard mode. Set the
serving.kserve.io/deploymentMode: "Standard" annotation per service, or ask before changing the cluster default.
- One model, one replica group, no prefix-aware routing ->
InferenceService with the vLLM runtime and a KEDA external trigger: references/inferenceservice-keda.md.
- Need cache-aware routing or prefill/decode split ->
LLMInferenceService (llm-d based), with spec.scaling.keda: references/llminferenceservice-keda.md. For the router itself use the llm-d-vllm-kubernetes skill.
- Scaling misbehaves,
ScalingReady is False, flapping or no scale-to-zero -> references/tuning-and-troubleshooting.md.
- Tearing down ->
references/tuning-and-troubleshooting.md (teardown section).
Rules
- Ask before changing the system. Installs, CRDs, runtimes, GPU workloads and cluster-wide defaults need approval and an undo path.
- Secrets never touch output. HF tokens and Prometheus credentials live in Kubernetes Secrets created from
0600 files or env vars. Never echo them or put them in manifests.
- Verify upstream. Versions, flags and defaults come from upstream docs read on the writing date. The KServe website lags the code, so check the CRD with
kubectl explain first.
- Standard mode only for KEDA.
autoscalerClass: keda does not work in Knative mode.
- One autoscaler per component. Do not add your own HPA or
ScaledObject for a component KServe already scales. Check with kubectl get hpa,scaledobject.
- Do not hard-code a GPU count. Size from the model and the GPU in
choosing-hardware, then verify with the load test.
- Pin the vLLM image. The bundled runtimes use floating or older tags (see the install reference). Create a pinned runtime and reference it by name.
- Metric thresholds are measured, not copied. Calibrate the trigger value with a load test on this model and GPU.
Build the stack
Version pins to know (checked 2026-10-11)
| Component |
Version |
Note |
| KServe |
v0.21.0 |
LLMInferenceService is v1alpha2; InferenceService is v1beta1. |
| KEDA |
2.21.0 latest |
KServe's install scripts pin 2.20.2. Both work; read the 2.21 breaking changes before moving. |
| vLLM |
v0.31.0 latest |
KServe's kserve-huggingfaceserver image bundles vLLM 0.24.0. |
| Kubernetes |
1.32+ |
Required by KServe. |
Full details and the reasons are in references/install.md.
Reference index
references/install.md: versions, prerequisites, KEDA and KServe install paths, token Secret, pinned vLLM runtime. Load first.
references/inferenceservice-keda.md: InferenceService manifest, Prometheus trigger, auth, the generated ScaledObject, request test.
references/llminferenceservice-keda.md: LLMInferenceService with direct KEDA, prefill scaling, WVA deprecation, what is unverified.
references/tuning-and-troubleshooting.md: metric choice, thresholds, cooldowns, scale-to-zero, failure table, teardown.
Companion skills
kserve: KServe depth, runtimes, storage, transformers. Install: npx skills add ScaleDockHQ/llm-skills --skill kserve.
keda: KEDA scalers and authentication depth. Install: npx skills add ScaleDockHQ/llm-skills --skill keda.
vllm: engine flags, quantization, metrics. Install: npx skills add ScaleDockHQ/llm-skills --skill vllm.
llm-d-vllm-kubernetes: the llm-d router with vLLM outside KServe. Install: npx skills add ScaleDockHQ/llm-skills --skill llm-d-vllm-kubernetes.
prometheus-grafana-llm: Prometheus scraping and dashboards for vLLM. Install: npx skills add ScaleDockHQ/llm-skills --skill prometheus-grafana-llm.
nvidia-gpu-operator: GPU drivers and device plugin on the cluster. Install: npx skills add ScaleDockHQ/llm-skills --skill nvidia-gpu-operator.
llm-evals: check quality after changing the runtime or quantization. Install: npx skills add ScaleDockHQ/llm-skills --skill llm-evals.
self-hosted-llms: pick between hosting options. Install: npx skills add ScaleDockHQ/llm-skills --skill self-hosted-llms.
1---2name: vllm-kserve-keda3description: Deploys and autoscales vLLM on Kubernetes with KServe and KEDA, using InferenceService or LLMInferenceService, the vLLM runtime and Prometheus scaling on queue depth. Use for kserve plus keda plus vllm, autoscalerClass keda, ScaledObject, scale vLLM replicas or ScalingReady false. Not for plain vLLM, llm-d routing or Dynamo.4license: MIT5compatibility: Needs kubectl access to a Kubernetes 1.32+ cluster with NVIDIA GPU nodes, plus helm. Optional jq. Installs, CRDs, GPU workloads and cluster-wide scaling need the user's explicit approval.6metadata:7 source: https://skillmd.com/skills/scaledockhq/vllm-kserve-keda8 author: ScaleDockHQ9 version: "0.1.0"10---1112# vLLM on KServe with KEDA1314Serve a vLLM model through KServe in Standard (raw Deployment) mode and scale its replicas with KEDA from vLLM's own Prometheus metrics. Ends with a Ready service, a generated `ScaledObject` and a load test that proves scale-out and scale-in.1516**Scope:** this combination only. Engine flags live in the `vllm` skill, KServe internals in `kserve`, KEDA internals in `keda`.1718Work through the steps in order. Load a reference only when a step names it.1920## Discover first2122Inspect the live system before changing anything. Every command is read-only and never prints secrets.2324```bash25kubectl version -o json | jq -r '.serverVersion.gitVersion' # KServe v0.21 needs 1.32+26kubectl get crd | grep -E 'serving.kserve.io|keda.sh|gateway.networking'27kubectl get deploy -A | grep -Ei 'kserve|keda|cert-manager|prometheus'28kubectl get clusterservingruntimes.serving.kserve.io 2>/dev/null29kubectl get cm inferenceservice-config -n kserve -o json 2>/dev/null \30 | jq -r '.data.deploy' # defaultDeploymentMode31kubectl get nodes -o json | jq -r '.items[] | [.metadata.name, (.status.allocatable["nvidia.com/gpu"] // "0")] | @tsv'32helm list -A | grep -Ei 'kserve|keda'33```3435## Decision flow36371. **No KServe or KEDA** -> install both, in Standard mode: `references/install.md`.382. **Pre-existing KServe in Knative (Serverless) mode** -> KEDA needs Standard mode. Set the `serving.kserve.io/deploymentMode: "Standard"` annotation per service, or ask before changing the cluster default.393. **One model, one replica group, no prefix-aware routing** -> `InferenceService` with the vLLM runtime and a KEDA external trigger: `references/inferenceservice-keda.md`.404. **Need cache-aware routing or prefill/decode split** -> `LLMInferenceService` (llm-d based), with `spec.scaling.keda`: `references/llminferenceservice-keda.md`. For the router itself use the `llm-d-vllm-kubernetes` skill.415. **Scaling misbehaves, `ScalingReady` is False, flapping or no scale-to-zero** -> `references/tuning-and-troubleshooting.md`.426. **Tearing down** -> `references/tuning-and-troubleshooting.md` (teardown section).4344## Rules4546- **Ask before changing the system.** Installs, CRDs, runtimes, GPU workloads and cluster-wide defaults need approval and an undo path.47- **Secrets never touch output.** HF tokens and Prometheus credentials live in Kubernetes Secrets created from `0600` files or env vars. Never echo them or put them in manifests.48- **Verify upstream.** Versions, flags and defaults come from upstream docs read on the writing date. The KServe website lags the code, so check the CRD with `kubectl explain` first.49- **Standard mode only for KEDA.** `autoscalerClass: keda` does not work in Knative mode.50- **One autoscaler per component.** Do not add your own HPA or `ScaledObject` for a component KServe already scales. Check with `kubectl get hpa,scaledobject`.51- **Do not hard-code a GPU count.** Size from the model and the GPU in `choosing-hardware`, then verify with the load test.52- **Pin the vLLM image.** The bundled runtimes use floating or older tags (see the install reference). Create a pinned runtime and reference it by name.53- **Metric thresholds are measured, not copied.** Calibrate the trigger value with a load test on this model and GPU.5455## Build the stack5657- [ ] Prerequisites and versions, then install KEDA and KServe -> `references/install.md`58- [ ] Create the HF token Secret and a pinned vLLM `ClusterServingRuntime` -> `references/install.md`59- [ ] Deploy the model with an `InferenceService` -> `references/inferenceservice-keda.md`60- [ ] Wire Prometheus scraping of vLLM `:8080/metrics` and the KEDA trigger -> `references/inferenceservice-keda.md`61- [ ] Optional: move to `LLMInferenceService` for routing or P/D -> `references/llminferenceservice-keda.md`62- [ ] Load test, watch scale-out and scale-in, then tune -> `references/tuning-and-troubleshooting.md`63- [ ] Verify: `kubectl get isvc` shows READY True, `kubectl get scaledobject` shows READY True and ACTIVE flips under load, replicas return to `minReplicas` after the cooldown, and a `/v1/chat/completions` request through the service URL succeeds.6465## Version pins to know (checked 2026-10-11)6667| Component | Version | Note |68| ---------- | -------------- | --------------------------------------------------------------------------------------------- |69| KServe | v0.21.0 | `LLMInferenceService` is `v1alpha2`; `InferenceService` is `v1beta1`. |70| KEDA | 2.21.0 latest | KServe's install scripts pin 2.20.2. Both work; read the 2.21 breaking changes before moving. |71| vLLM | v0.31.0 latest | KServe's `kserve-huggingfaceserver` image bundles vLLM 0.24.0. |72| Kubernetes | 1.32+ | Required by KServe. |7374Full details and the reasons are in `references/install.md`.7576## Reference index7778- `references/install.md`: versions, prerequisites, KEDA and KServe install paths, token Secret, pinned vLLM runtime. Load first.79- `references/inferenceservice-keda.md`: `InferenceService` manifest, Prometheus trigger, auth, the generated `ScaledObject`, request test.80- `references/llminferenceservice-keda.md`: `LLMInferenceService` with direct KEDA, prefill scaling, WVA deprecation, what is unverified.81- `references/tuning-and-troubleshooting.md`: metric choice, thresholds, cooldowns, scale-to-zero, failure table, teardown.8283## Companion skills8485- `kserve`: KServe depth, runtimes, storage, transformers. Install: `npx skills add ScaleDockHQ/llm-skills --skill kserve`.86- `keda`: KEDA scalers and authentication depth. Install: `npx skills add ScaleDockHQ/llm-skills --skill keda`.87- `vllm`: engine flags, quantization, metrics. Install: `npx skills add ScaleDockHQ/llm-skills --skill vllm`.88- `llm-d-vllm-kubernetes`: the llm-d router with vLLM outside KServe. Install: `npx skills add ScaleDockHQ/llm-skills --skill llm-d-vllm-kubernetes`.89- `prometheus-grafana-llm`: Prometheus scraping and dashboards for vLLM. Install: `npx skills add ScaleDockHQ/llm-skills --skill prometheus-grafana-llm`.90- `nvidia-gpu-operator`: GPU drivers and device plugin on the cluster. Install: `npx skills add ScaleDockHQ/llm-skills --skill nvidia-gpu-operator`.91- `llm-evals`: check quality after changing the runtime or quantization. Install: `npx skills add ScaleDockHQ/llm-skills --skill llm-evals`.92- `self-hosted-llms`: pick between hosting options. Install: `npx skills add ScaleDockHQ/llm-skills --skill self-hosted-llms`.