Cloud · Kubernetes · AI infrastructure

Inference gateways on Kubernetes: model-aware routing for self-hosted LLMs

Round-robin load balancing assumes requests are short and roughly equal. LLM requests are neither. The Kubernetes Gateway API Inference Extension adds model-aware routing to an ordinary gateway, and it changes how I design private model platforms.

ExplainerSumanta Mukhopadhyay8 min read5 sources
#kubernetes#ai#llm#platform
EXPLAINER · CLOUD · KUBERNETES · AI INFRASTRUCTURE24 Oct 2026 · 04:15 GST

When teams first put a self-hosted model behind Kubernetes, they usually reach for the familiar pattern: a Deployment of model servers, a Service in front, and a load balancer spreading requests evenly. It works in a demo. Under real load, some replicas sit with long queues and nearly full GPU memory while others are idle, and tail latency climbs even though the cluster as a whole has spare capacity.

Why LLM traffic breaks ordinary load balancing

The Kubernetes project's introduction to the Inference Extension puts it plainly: LLM inference sessions are often long-running, resource-intensive and partially stateful, and a single GPU-backed server may hold several sessions and in-memory token caches. Load balancers that route by HTTP path or round-robin don't account for model identity, request criticality or the current state of each server1.

Two requests to the same model can differ in cost by orders of magnitude, depending on prompt and output length. And as covered in LLM inference serving, sending a request to a replica that already holds its prompt prefix in cache is far cheaper than sending it anywhere else.

How the extension works

The Gateway API Inference Extension builds on Gateway API, keeping the familiar Gateway and HTTPRoute model and adding inference-specific steps15. Its central resource is the InferencePool: a pool of model-server pods on shared compute, similar to a Service but aware of model serving1. The project documentation lists InferencePool as generally available since v1.0.02.

Diagram of the Gateway API Inference Extension resource model: cluster operators own the Gateway, application developers own the HTTPRoute, inference platform owners own the InferencePool, and inference workload owners own InferenceModel resources beneath it
The resource model as introduced in 2025: platform operators manage pools of model servers; model owners manage what is served. Source: Kubernetes blog, Introducing Gateway API Inference Extension · CC BY 4.0

The original design separated responsibilities by persona: platform operators manage where and how models are served through pools, while model owners manage what is served, including traffic splitting between versions1. The model-facing APIs have continued to evolve, so check the current documentation for your version.

The request flow

A request reaches the gateway, which matches an HTTPRoute to an InferencePool. Instead of forwarding to any pod, the gateway consults an endpoint selection extension, often called the endpoint picker, which examines live pod metrics such as queue length, memory use and loaded adapters, and chooses the pod that can serve the request most efficiently1. Gateway implementations describe the picker tracking signals such as KV-cache utilisation and queue length4.

Diagram of the inference request flow: a client completion request reaches the Kubernetes Gateway, which uses body-based routing to select an InferencePool by model name and an endpoint selection step to pick the least-loaded model replica, then routes to that replica in the pool
Request flow with the endpoint selection extension choosing a model-server pod based on live metrics. Source: Kubernetes blog, Introducing Gateway API Inference Extension · CC BY 4.0

To the client it's still one ordinary request. The intelligence lives in the gateway layer, where the platform team controls it.

What the benchmark showed

The project compared the extension with a standard Kubernetes Service for a vLLM deployment on H100 GPUs, ramping traffic from 100 to 1,000 queries per second. Throughput was roughly on par, but the extension showed significantly lower p90 per-output-token latency at higher load, and lower end-to-end tail latency as traffic rose beyond about 400 to 500 queries per second1. The authors attribute this to avoiding hotspots that ordinary load balancing creates for long-running inference requests1.

Tail latency is what users feel, and GPU hotspots are what finance pays for. Model-aware routing improves both without buying another GPU.

How I'd adopt it

  1. Start from Gateway API. If your clusters still use an Ingress controller, the move to Gateway API is the prerequisite and has its own value.
  2. Pick a gateway implementation that supports the Inference Extension, and confirm which version of the APIs it implements.
  3. Expose metrics from your model servers that the endpoint picker needs, and check them under load before trusting the routing.
  4. Load test against your own traffic, comparing tail latency and cost per request with your current setup, as in LLM inference serving.
  5. Use pools to separate concerns: interactive and batch traffic, regulated and general workloads, or different hardware classes.
  6. Combine with scheduling and cost controls: GPU allocation through DRA, training jobs through gang scheduling, and spend visibility through FOCUS-based cost allocation.

Where it fits in a private AI platform

An inference gateway is the routing layer in the platform described in private LLMs on-prem and where to run models in the UAE. Above it sits the policy gateway that handles authentication, model approval and logging; below it, the serving engines and GPUs. Keeping those layers distinct makes each easier to change.

How I can help

I design Kubernetes platforms for private and sovereign AI, from GPU scheduling to model-aware routing and cost control. See my AI architecture work, or analyse your challenge and bring the result to a call.

References
  1. 1
    Introducing Gateway API Inference ExtensionKubernetes blog · 5 Jun 2025
  2. 2
    InferencePoolGateway API Inference Extension documentation
  3. 3
    Gateway API Inference ExtensionKubernetes SIG Network
  4. 4
    Inference routingagentgateway documentation
  5. 5
    Gateway APIKubernetes documentation
FAQ

Common questions

What is the Gateway API Inference Extension?

A Kubernetes project that builds on Gateway API to add inference-specific routing. It lets a gateway pick the best model-server pod for each request using live metrics such as queue length, memory use and loaded adapters, rather than plain round-robin.

What is an InferencePool?

A resource that defines a group of model-server pods on shared compute, similar to a Service but specialised for model serving. The project's documentation lists InferencePool as generally available since its v1.0.0 release.

Does model-aware routing improve performance?

In the project's 2025 benchmark with vLLM on H100 GPUs, the extension delivered throughput roughly on par with a standard Kubernetes Service but significantly lower tail latency at higher request rates. Results on your own workload will vary and should be measured.

Keep reading

Related

Open to advisory, fractional CTO & select builds

Let's talk about what you're building.

The fastest route is a free 30-minute call. Prefer to write? Send a message and I'll reply personally within two business days.

Start a conversation

How would you like to reach me?

Book a 30-min callFastest. Pick any open slot on my calendar.→ Write in GmailOpens a pre-filled draft in your browser.→ Use my email appOutlook, Apple Mail or your default client.→

I reply personally within two business days. Time zones from the Americas and Europe to the Middle East and Asia-Pacific.