Using GAIE with vanilla vLLM
Add Dynamo’s advanced KV-aware routing to GAIE deployments that use upstream vLLM images.
This on-ramp uses the experimental standalone mode of the Dynamo Endpoint Picker Plugin (EPP). This is a special operator-free integration for existing vanilla vLLM fleets, not the standard operator-managed Gateway API path. Standalone mode is not available in a published Dynamo release yet. Use an image built from a Dynamo revision that includes standalone EPP support.
Use this on-ramp to add Dynamo’s advanced KV-aware routing to
Gateway API Inference Extension (GAIE)
deployments that run stock vllm serve workers. Stock vLLM means the upstream vLLM container
images. You do not need to replace them with Dynamo vLLM images, install the Dynamo operator, or
migrate the rest of the deployment to Dynamo. The standalone Dynamo Endpoint Picker Plugin (EPP)
adds the routing layer while your Gateway, HTTPRoute, and InferencePool remain standard GAIE
resources and your workers keep running the upstream vLLM images.
The EPP runs the same Dynamo worker selection service used by a full Dynamo deployment. In standalone
mode, it runs in-process without a DynamoGraphDeployment (DGD) or the Dynamo distributed runtime
and event plane.
This is still the Gateway API routing topology described in KV-Aware Routing on Kubernetes. Standalone mode changes who creates the resources and how the EPP discovers worker state; it does not add a third request-entry topology.
Architecture
The InferencePool is the source of truth for the worker labels and HTTP port. The EPP watches that
pool and Ready pods in its namespace, subscribes directly to each worker’s KV event socket, and calls
vLLM’s /v1/chat/completions/render endpoint to tokenize each routing request. The Gateway forwards
the original request to the selected pod. The render Service is not a separate renderer workload; it
is a stable Kubernetes Service address for the HTTP endpoint served by the same vLLM pods.
For the operator-managed topology and generated-resource boundary, see Using GAIE with Dynamo.
Before You Begin
You need:
- A Kubernetes cluster with GPU nodes.
kubectland Helm configured for the cluster.- A Dynamo source checkout.
- A container registry that every cluster node can pull from.
- Two schedulable GPUs for the example’s two vLLM replicas. You can scale the worker Deployment to one replica for a smoke test.
The example serves the public Qwen/Qwen3-0.6B model, which does not require a Hugging Face token.
Build the EPP Image
Standalone mode is not available in a published Dynamo image yet. From the repository root, build the Rust EPP from the current source revision and push it to your container registry:
Choose a Deployment Path
Choose the path that matches your starting point:
- Deploy from Scratch installs the Gateway API layer and applies the complete example, including
vLLM workers, the EPP, an
InferencePool, and anHTTPRoute. - Use the Dynamo EPP in an Existing GAIE Deployment keeps your current Gateway,
HTTPRoute,InferencePool, and vLLM workers. Deploy a replacement EPP as shown below, or adapt the existing EPP Deployment in place with the same configuration.
Both paths use the same example names so the verification commands apply to either path:
For an existing GAIE deployment, these are example names. Replace them in the commands and YAML snippets with the names of your existing resources.
Set the shared namespace variables:
Deploy from Scratch
Use the Dynamo EPP in an Existing GAIE Deployment
Install the Gateway API Layer
Install Gateway API, GAIE, agentgateway, and the Gateway:
The script pins the supported Gateway API, GAIE, and agentgateway versions. It creates the
inference-gateway Gateway in $AGW_NAMESPACE; the http listener allows HTTPRoute resources
from workload namespaces. The on-ramp resources remain in $NAMESPACE.
Verify that the Gateway is programmed:
Configure Model Access
The public Qwen/Qwen3-0.6B model in the example does not require authentication. To substitute a
gated or private Hugging Face model, create a Secret in the workload namespace before deploying:
Add the Secret reference to the vLLM container in agg.yaml:
Deploy the On-ramp
The installation script above creates the Gateway API and GAIE layer. The example manifest then
creates the workload layer in $NAMESPACE:
- Two stock vLLM workers with prefix caching, KV events, and readiness probes.
- A
vllm-qwen-renderService that selects those same workers and exposes their HTTP port for/v1/chat/completions/render. - Namespaced RBAC:
get,list, andwatchfor pods,InferencePool, andEndpointSliceresources;getfor the EPP peer Service. - Two standalone EPP replicas and their gRPC and replica-synchronization Service.
- An
InferencePooland anHTTPRoutethat attaches to the cross-namespace Gateway.
Set VLLM_IMAGE to the vLLM image your platform uses, including its release tag or digest. Use a
digest for reproducible deployments. Apply the manifest from the repository root using that image
and the EPP image you pushed:
The checked-in manifest is also available as
agg.yaml.
The starting point for this path is a working GAIE request path with a Gateway, HTTPRoute,
InferencePool, EPP Deployment and Service, and upstream vLLM Deployment. Keep the Gateway,
HTTPRoute, InferencePool, and vLLM workload. Choose how to deploy the Dynamo EPP:
- Deploy a replacement EPP. Create a new Dynamo EPP Deployment and Service, switch
InferencePool.spec.endpointPickerRefto the new Service, and then remove the previous EPP Deployment and Service. - Adapt the existing EPP Deployment in place. Change its container image and configuration to
run the Dynamo EPP. Keep the existing Service name and port so
InferencePool.spec.endpointPickerRefdoes not change.
The steps below demonstrate the replacement path and use dynamo-epp for the new Deployment and
Service. To adapt the existing Deployment instead, apply the same Dynamo image, environment
variables, ports, readiness probe, ServiceAccount, and RBAC in place. Keep its labels aligned with
the existing Service selector, and keep the Service and endpointPickerRef unchanged.
Ensure that the Gateway listener allows routes from $NAMESPACE. See
Install Gateway API Inference Extension for the shared agentgateway and Istio
prerequisites.
Configure vLLM
Every worker selected by the InferencePool must:
- Expose its OpenAI-compatible server port.
- Pass a readiness probe before the EPP registers it.
- Enable prefix caching.
- Publish KV cache events over ZMQ.
- Use the same block size and maximum batched-token value configured on the EPP.
The InferencePool selects pods, not the Deployment object. Ensure that its selector label is on
spec.template.metadata.labels. To add the example label without replacing existing pod-template
labels, patch the vLLM Deployment:
Do not use kubectl label deployment for this step. That command changes
Deployment.metadata.labels, which does not label the worker pods.
Compare a typical existing vLLM container with the changes required by the on-ramp. In both
snippets, replace <VLLM_IMAGE> with your existing vLLM image reference, including its release tag
or digest.
Before — existing vLLM container:
After — vLLM container prepared for the Dynamo EPP:
If your workers run as non-root, set runAsUser to a UID that exists in the image’s
/etc/passwd — 2000 (the vllm user) for vllm/vllm-openai. While configuring its compile
cache, PyTorch resolves the running UID through getpass.getuser(), so an arbitrary UID with no
passwd entry fails that lookup and vLLM exits on import before parsing any argument. The on-ramp
itself adds no requirement here: the image runs as root by default and needs no such change.
To tokenize each routing request, the Dynamo EPP calls vLLM’s
/v1/chat/completions/render endpoint through a stable Service URL. This is not a separate renderer
deployment; the endpoint runs on the same vLLM pods that serve inference requests. Reuse an existing
HTTP Service when it selects the same homogeneous vLLM pods, or create a Service such as:
Because the Service and EPP are in the same namespace, its base URL is
http://vllm-qwen-render:8000. Set DYN_EPP_TOKENIZER_SERVICE_URL to that URL, or to the
corresponding URL for the existing Service you reuse.
Deploy a Replacement EPP
Create a ServiceAccount with namespaced get, list, and watch access to pods, InferencePool
resources, and EndpointSlice resources. When you set DYN_EPP_PEER_SERVICE, also grant get
access to Services. Create the replacement dynamo-epp Service with gRPC port 9002 before its
Deployment. The complete ServiceAccount, RBAC, Deployment, and Service definitions are available in
the agg.yaml EPP resources.
Then create the replacement Deployment with the Dynamo EPP image. The environment variables belong
to the EPP container in
spec.template.spec.containers[].env:
The example runs two EPP replicas, so DYN_EPP_PEER_SERVICE and POD_IP are part of its required
configuration.
The model name, block size, event port, and maximum batched-token values in the example are one coherent configuration. Change them together when adapting another model or vLLM deployment.
Connect the InferencePool
Confirm these fields on the existing InferencePool:
- Confirm that
spec.selectormatches labels on the vLLM pod template, not only the Deployment. - Confirm that
spec.targetPorts[0].numberis the vLLM HTTP port. - Update
spec.endpointPickerRefto the replacementdynamo-eppService on port9002. When adapting the existing Deployment behind the same Service and port, this field does not change.
The Dynamo EPP reads the pool at runtime. Do not duplicate the worker selector or HTTP port in EPP environment variables.
If you deployed a replacement, remove the previous EPP Deployment and Service after switching
spec.endpointPickerRef.
Verify the Deployment
These commands apply to both paths because they use the same example names. Wait for the vLLM workers and EPP:
Confirm that the route attached to the intended Gateway:
The output should identify inference-gateway and report Accepted=True and
ResolvedRefs=True.
Find the Service generated for the Gateway and start a port-forward:
In another terminal, send an OpenAI-compatible request:
Inspect the EPP logs near the request:
The logs should show worker discovery and endpoint selection. If the model responds but the EPP logs
show no selection, the route is bypassing the InferencePool.
EPP Replication
Each EPP replica has an in-process selector and KV index. When DYN_EPP_PEER_SERVICE is set, the EPP
validates that Service at startup, then watches its EndpointSlice resources for sibling Pod IPs. Each
replica binds and dials DYN_EPP_REPLICA_SYNC_PORT, which defaults to TCP port 9092; every EPP
selected by the Service must use the same value. They synchronize admission, prefill-complete, and free
events so active-load accounting converges across replicas.
Replica synchronization does not copy the full KV index to a new EPP. A new replica warms its index from live worker events and optional replay. For consistency details, see Standalone Selection Service.
For a single EPP replica, set spec.replicas: 1 and remove DYN_EPP_PEER_SERVICE and POD_IP.
Standalone EPP Configuration Reference
Scope and Limitations
The standalone path currently targets aggregated vLLM serving with data-parallel size 1 per pod. It does not provide the DGD/operator lifecycle, Dynamo runtime discovery, disaggregated prefill/decode orchestration, request migration, topology-aware routing, or full operator-managed observability.
Use GAIE with Dynamo when you want the supported operator-managed lifecycle, Dynamo workers, or disaggregated serving. Use Gateway API Routing Reference for the DGD and operator-generated resource contract; that contract does not configure standalone mode.
Troubleshoot
Follow the full request path when debugging:
Clean Up the From-Scratch Example
If you used the Deploy from Scratch path, delete the example resources:
Delete the namespace only if it contains no resources you want to keep: