GKE Inference Gateway / Gateway API Inference Extension
Apply the judgment of an engineer who runs large model-serving fleets in production: someone who knows
that the bottleneck for LLM serving is the endpoint picker's per-request decision, not the L7 proxy,
and who treats KV cache, queue depth, and LoRA adapters as first-class routing inputs.
The standard here is the Gateway API Inference Extension (gateway-api-inference-extension, an
OSS Kubernetes SIG-Network project). The GKE Inference Gateway is one managed implementation of it.
This API is evolving fast — always verify the exact API group/version and field names against the
current project/docs before authoring manifests.
How to use this skill
- Read
gke-inference-gateway-guide.md in this directory — the full reference (mental model,
InferencePool/InferenceModel/EPP, smart-routing capabilities, deployment, ops, troubleshooting).
Apply it to the task.
- For a concrete, annotated manifest set to imitate (Gateway + HTTPRoute + InferencePool +
InferenceModel → vLLM), read
examples.md. It carries a "verify API version/fields" caveat.
- Match the surrounding cluster's conventions (Gateway class, namespaces, naming). Apply the
correctness/safety rules and the "verify against current docs" discipline regardless.
The essentials (full detail in gke-inference-gateway-guide.md)
- Round-robin is the wrong default for LLMs. Requests have wildly variable cost and duration
(prompt length, output length), each replica holds a stateful per-replica KV cache, prefill and
decode have different profiles, and one long request causes head-of-line blocking. Routing must be
queue-, cache-, and model-aware — a body-blind L7 hash cannot do this. See
[[serving-frameworks]].
- The model is: Gateway API + an inference extension. A standard
Gateway and HTTPRoute send
traffic to an InferencePool (a pool of model-server endpoints) instead of a Service. An
Endpoint Picker (EPP) — an external extension the Gateway calls per request — chooses the specific
pod using live metrics. InferenceModel/objective objects declare model-level intent (criticality,
base-model name, adapter routing). Verify exact kinds/fields against the current project.
- Smart routing inputs: load/queue depth, KV-cache utilization, prefix-cache locality
(route same-prefix requests to the replica that already cached it), and LoRA-adapter awareness
(many adapters share base weights; route to a replica that has the adapter loaded).
- Criticality / fairness: mark traffic (e.g. Critical vs Sheddable) so the picker sheds or deprioritizes
low-criticality requests under saturation instead of degrading everything.
- Traffic management is Gateway-native: canary/A-B/version splits via
HTTPRoute weights and
backendRefs across pools; model-name and request-body-based routing select the pool/adapter.
- Backends are unchanged model servers (vLLM/JetStream/Triton) exposing OpenAI-compatible endpoints
and a metrics endpoint the EPP scrapes. Multi-host models pair with LeaderWorkerSet
(
[[jobset-leaderworkerset]]); pool metrics feed autoscaling ([[autoscaling-kubernetes]]).
- Observe per model, not per pool: TTFT, TPOT/ITL, queue depth, KV-cache utilization, tokens/sec,
adapter hit rate. These are also your scaling and rollout signals.
- When to use it: many replicas of expensive LLM servers where placement matters. For a single
small model or non-LLM service, a plain
Service/HPA or KServe is simpler. See guide's comparison.
- Reserve the LLM-aware path for LLM traffic. Don't route generic REST through the EPP — you add a
per-request hop for no benefit.
Related skills
[[serving-frameworks]] — the engine side: vLLM/SGLang/Triton, continuous batching, KV cache, LoRA.
[[jobset-leaderworkerset]] — multi-host serving (a model sharded across pods) behind a pool.
[[autoscaling-kubernetes]] — HPA/KEDA/custom metrics driven by pool/queue/KV signals.
[[gke-master]] — GKE platform: GPU/TPU node pools, Gateway controller, networking.
[[aiml-on-kubernetes]] — the umbrella for training+inference on K8s/GKE.
[[llm-app-agent-frameworks]] — clients/agents calling the OpenAI-compatible endpoint in front.
[[ai-security-on-gke]] — auth, model armor/safety, tenant isolation in front of the gateway.
1---2name: gke-inference-gateway3description: GKE Inference Gateway / Gateway API Inference Extension4---56# GKE Inference Gateway / Gateway API Inference Extension78Apply the judgment of an engineer who runs large model-serving fleets in production: someone who knows9that the bottleneck for LLM serving is the **endpoint picker's per-request decision**, not the L7 proxy,10and who treats KV cache, queue depth, and LoRA adapters as first-class routing inputs.1112The standard here is the **Gateway API Inference Extension** (`gateway-api-inference-extension`, an13OSS Kubernetes SIG-Network project). The **GKE Inference Gateway** is one managed implementation of it.14This API is **evolving fast** — always verify the exact API group/version and field names against the15current project/docs before authoring manifests.1617## How to use this skill18191. **Read `gke-inference-gateway-guide.md`** in this directory — the full reference (mental model,20 InferencePool/InferenceModel/EPP, smart-routing capabilities, deployment, ops, troubleshooting).21 Apply it to the task.222. For a concrete, annotated manifest set to imitate (Gateway + HTTPRoute + InferencePool +23 InferenceModel → vLLM), read **`examples.md`**. It carries a "verify API version/fields" caveat.243. Match the surrounding cluster's conventions (Gateway class, namespaces, naming). Apply the25 correctness/safety rules and the "verify against current docs" discipline regardless.2627## The essentials (full detail in `gke-inference-gateway-guide.md`)2829- **Round-robin is the wrong default for LLMs.** Requests have wildly variable cost and duration30 (prompt length, output length), each replica holds a **stateful per-replica KV cache**, prefill and31 decode have different profiles, and one long request causes **head-of-line blocking**. Routing must be32 queue-, cache-, and model-aware — a body-blind L7 hash cannot do this. See `[[serving-frameworks]]`.33- **The model is: Gateway API + an inference extension.** A standard `Gateway` and `HTTPRoute` send34 traffic to an **`InferencePool`** (a pool of model-server endpoints) instead of a `Service`. An35 **Endpoint Picker (EPP)** — an external extension the Gateway calls per request — chooses the *specific*36 pod using live metrics. `InferenceModel`/objective objects declare model-level intent (criticality,37 base-model name, adapter routing). **Verify exact kinds/fields against the current project.**38- **Smart routing inputs:** load/queue depth, **KV-cache utilization**, **prefix-cache locality**39 (route same-prefix requests to the replica that already cached it), and **LoRA-adapter awareness**40 (many adapters share base weights; route to a replica that has the adapter loaded).41- **Criticality / fairness:** mark traffic (e.g. Critical vs Sheddable) so the picker sheds or deprioritizes42 low-criticality requests under saturation instead of degrading everything.43- **Traffic management is Gateway-native:** canary/A-B/version splits via `HTTPRoute` weights and44 `backendRefs` across pools; model-name and request-**body-based** routing select the pool/adapter.45- **Backends are unchanged model servers** (vLLM/JetStream/Triton) exposing OpenAI-compatible endpoints46 and a metrics endpoint the EPP scrapes. Multi-host models pair with LeaderWorkerSet47 (`[[jobset-leaderworkerset]]`); pool metrics feed autoscaling (`[[autoscaling-kubernetes]]`).48- **Observe per model, not per pool:** TTFT, TPOT/ITL, queue depth, KV-cache utilization, tokens/sec,49 adapter hit rate. These are also your scaling and rollout signals.50- **When to use it:** many replicas of expensive LLM servers where placement matters. For a single51 small model or non-LLM service, a plain `Service`/HPA or KServe is simpler. See guide's comparison.52- **Reserve the LLM-aware path for LLM traffic.** Don't route generic REST through the EPP — you add a53 per-request hop for no benefit.5455## Related skills5657- `[[serving-frameworks]]` — the engine side: vLLM/SGLang/Triton, continuous batching, KV cache, LoRA.58- `[[jobset-leaderworkerset]]` — multi-host serving (a model sharded across pods) behind a pool.59- `[[autoscaling-kubernetes]]` — HPA/KEDA/custom metrics driven by pool/queue/KV signals.60- `[[gke-master]]` — GKE platform: GPU/TPU node pools, Gateway controller, networking.61- `[[aiml-on-kubernetes]]` — the umbrella for training+inference on K8s/GKE.62- `[[llm-app-agent-frameworks]]` — clients/agents calling the OpenAI-compatible endpoint in front.63- `[[ai-security-on-gke]]` — auth, model armor/safety, tenant isolation in front of the gateway.