👋 Hi! I’m Bibin Wilson. In each edition, I share practical tips, guides, and the latest trends in DevOps and MLOps to make your day-to-day DevOps tasks more efficient. If someone forwarded this email to you, you can subscribe here to never miss out!

✉️ In Today’s MLOps Edition

In today's edition, you will learn the following.

  • Why a normal Gateway is not enough for LLM traffic

  • What the Gateway API Inference Extension is

  • How the Endpoint Picker (EPP) chooses the best model Pod

  • How a request flows from the user to the model

  • Hands-on: Route traffic to a test LLM using AgentGateway

We’ll also cover Kubernetes gang scheduling, Uber’s agent skills, and more.

Let's get into it.

⏳ Last Chance to Save Up to 65% on Linux Foundation

The Linux Foundation Cyber Monday sale ends tomorrow, December 4.

Planning to take the CKA, CKAD, or CKS in 2027?

You can book your exam now and save 50% on the exam fee using code BFCM26CCCT at kube.promo/cyber

Once the sale ends, you’ll have to wait until next year’s Black Friday for the next round of deals.

Let's say you run an LLM with 3 replicas in Kubernetes.

You put a Gateway in front of it. The Gateway sends requests using round-robin or least-connections.

So what's the problem?

One Pod may already have a long queue of waiting requests. Another Pod may be free. But with round-robin, the next request can still go to the busy Pod if it's next in line.

This happens because a normal Gateway can't see what is happening inside the model server.

For a web app, this is fine. But an LLM request can take seconds to finish. So one bad routing choice means slow responses for your users.

This is where the Gateway API Inference Extension helps.

Gateway API Inference Extension

The Gateway API Inference Extension is a Kubernetes project. It adds model-aware routing on top of the Gateway API for self-hosted LLMs.

It doesn't just pick the next Pod in line. It picks a Pod based on live metrics from the model servers.

❝

💡 Note: It supports OpenAI-compatible endpoints like /v1/chat/completions and /v1/completions. It works with model servers like vLLM, SGLang, and Triton.

Endpoint Picker (EPP): Picks the Best Pod

The key component is the Endpoint Picker (EPP). It runs as a standalone Pod (deployment). It collects metrics from the model server Pods. Then it picks the best Pod for each request based on:

  • Queue length: How many requests are already waiting

  • KV cache usage: How much memory the model's cache uses

  • Active LoRA adapter: A Pod that already has the adapter loaded is faster, because loading a new adapter takes time

and more.

The following image shows how the EPP picks a Pod for each request.

The EPP collects these metrics continuously, not only when a request comes in. So when the Data Plane asks for a Pod, the EPP already has fresh data to score each Pod.

You have to deploy one EPP for each InferencePool.

So what is an InferencePool?

InferencePool: A Kubernetes Service for Model Servers

If you are new to this, you might ask: Why not just use a Kubernetes Service?

A Service sends traffic to any matching Pod. It knows nothing about the model inside.

An InferencePool also groups the model server Pods. However, it gives the Gateway two things:

  1. Which Pods belong to the pool, using a label selector

  2. Which EPP to ask for the best model server Pod

The following image illustrates this better.

The InferencePool points to the model Pods and to the EPP.

❝

💡 Note: You don't have to write the InferencePool. The official Helm chart creates both the InferencePool and the EPP. You only give it the label of your model Pods.

How the Gateway Finds the Model Name

There is one more problem to solve.

When a request comes, the model name is in the JSON request body, as shown below.

{
  "model": "Qwen/Qwen3-32B",
  "prompt": "Hello"
}

However, an HTTPRoute can't read the request body. It can only match paths and headers.

Earlier, a separate Body-Based Router (BBR) Pod did this job. But that's one more Pod to run and manage, and it adds latency.

AgentGateway solves this with its AgentgatewayPolicy CRD. Here is the key part.

traffic:
  phase: PreRouting
  transformation:
    request:
      set:
      - name: X-Gateway-Base-Model-Name
        value: |
          {
            "Qwen/Qwen3-32B": "Qwen/Qwen3-32B"
          }[string(json(request.body).model)]

This policy reads the model field from the request body and sets it as the X-Gateway-Base-Model-Name header. Because it runs in the PreRouting phase, the header exists before the HTTPRoute checks the request. No extra Pod needed.

Now, let’s see how everything works together.

How a Request Flows

Now let's put it all together and follow one request from the user reaching the selected model Pod.

Let's trace a single request flow.

  1. First, the user sends a request to the Gateway's LoadBalancer endpoint. The request body includes the model name, for example "model": "Qwen/Qwen3-32B".

  2. The request reaches the AgentGateway proxy. Before any routing happens, the proxy uses AgentGatewayPolicy to read the model name from the request body and adds the name as a header, X-Gateway-Base-Model-Name.

  3. Now the request has the header, the HTTPRoute can match it and find the InferencePool for that model.

  4. The InferencePool tells the proxy which EPP to ask. So the proxy asks that correct EPP for the best Pod.

  5. Since the EPP already has live metrics from all the model Pods. It scores each Pod and sends back the address of the Pod.

  6. Finally, the proxy sends the request to that Pod, and the Pod returns the model's response to the user.

❝

💡 Note: We used AgentGateway as the Gateway controller. Istio and NGINX Gateway Fabric also support the Inference Extension. But the flow stays the same. Only the controller and some config change.

Hands-on: Route Traffic to an LLM

So far, we have looked at how each piece works on its own. But the best way to understand this is to see a request reach the right Pod in a real cluster.

That's why I have put the full setup in a separate hands-on edition. You don't need a GPU. It uses a simulator LLM.

In the hands-on edition, you will:

  • Deploy a test LLM with 3 replicas

  • Set up AgentGateway as the Gateway controller

  • Create the InferencePool, EPP, HTTPRoute, and AgentGatewayPolicy

  • Send a test request with curl and get a response from the LLM

Sponsored By Udacity

Get Up to 55% Off on Udacity Courses

Build practical DevOps, cloud, or AI skills with Udacity’s hands-on projects and expert feedback. Choose a program that matches your goals, then apply what you learn to a real project.

Get 55% off with code BF55, or 15% off with BF15 (based on region)

🧱 Kubernetes Gang Scheduling

Gang Scheduling is one of the key concepts in MLOps. Deep learning frameworks (TensorFlow, PyTorch, etc.) require all workers to be running during training.

Let's say a training job needs 8 workers, each requesting 1 GPU. The k8s cluster has only 5 free GPUs. Without gang scheduling, the default scheduler treats each pod independently.

So, it schedules 5 worker pods, and 3 remain pending. The 5 running workers cannot actually start training. So those GPUs remain occupied while waiting.

With gang scheduling, the scheduler first checks whether resources are available for the entire training job. If enough resources are available, it schedules all worker pods together.

Otherwise, it schedules none of the pods. The 5 free GPUs stay available for other jobs. You can call it an all-or-nothing approach.

It primarily avoids GPU resource waste from partially scheduled distributed workloads.

We have a detailed guide that explains this using practical examples.

📦 Keep Yourself Updated

  1. Spotify Outage Incident Report: Spotify explains how conflicting deployment changes caused Argo CD to repeatedly scale down its authentication service, turning a deployment issue into a major outage.

  2. Sentry Autoscaling Incident: Sentry found that one GitLab webhook could trigger millions of internal RPC calls, pushing its Kubernetes deployment from around 32 pods to the 256-pod autoscaling limit.

  3. Uber Agent Skills at Scale: Uber explains how it manages and evaluates thousands of reusable AI agent skills, with more than 1 million skill runs every month.

  4. Argo CD Migration Hook Issue: A real GitOps failure where Argo CD showed applications as synced and healthy, but self-heal skipped the database migration hook in two regions.

🛠️ DevOps Tool of the Week (Popeye)

Which Pods are missing resource limits? Which ConfigMaps are still around after the apps that used them are gone?

Popeye is an open-source, read-only tool that scans your live Kubernetes cluster and flags issues like these. 👇

  • Checks Pod probes, resource requests and limits, and image tags

  • Flags unused ConfigMaps, Secrets, ServiceAccounts, and RBAC objects

  • Checks networking resources, including Services, Ingresses, NetworkPolicies, and Gateway API resources

  • Scores your cluster from 0 to 100 and exports reports in several formats

Run it locally with your current kubeconfig or schedule regular scans with a CronJob.

👉 Start Here: Popeye

Reply

Avatar

or to participate