← Technology, Science & Infrastructure ▣ Distilled locally

The open AI-native stack on Kubernetes: From open models to distributed inference and agents

By Allan Naim
November 10, 2026  ·  Google Cloud Blog ↗
The open AI-native stack on Kubernetes: From open models to distributed inference and agents

Over the past decade, Kubernetes established itself as the standard for orchestrating microservices and containerized applications. Today, we're witnessing the next major architectural shift in distributed computing: AI workloads moving from isolated research prototypes into large-scale, multi-tenant production fleets. In this post, we'll walk through the open-source stack that powers this shift and show you the sample manifests that you can try on your own Kubernetes clusters. You can also join us at KubeCon + CloudNativeCon North America 2026 to see these projects in action through live demos and technical sessions.

For modern engineering teams, production AI is rapidly moving beyond generic calls to closed, black-box APIs. Organizations are realizing that their long-term competitive advantage lies in domain specialization. Platform engineers, ML researchers, and AI builders want the autonomy to run high-performing open-weight models (such as the Gemma family). They want to adapt them to proprietary enterprise datasets by using reinforcement learning (RL) and serve them with predictable latency, high throughput, and maximum hardware efficiency.

Whether it's scientific initiatives training domain models like DolphinGemma (an LLM helping scientists study how dolphins communicate) on acoustic data, legal platforms evaluating complex contracts, or engineering teams building autonomous coding agents, the objective is the same: achieving frontier-level task performance at a fraction of the serving cost and latency.

Yet, scaling RL post-training, stateful distributed inference, and autonomous agent execution on traditional container infrastructure introduces substantial hurdles:

At KubeCon + CloudNativeCon North America 2026, Google Cloud is addressing these challenges by introducing and expanding a unified, open-source AI-native stack across Kubernetes and Google Kubernetes Engine (GKE) based on these components:

Bridge reinforcement learning and Kubernetes with OpenRL

While supervised fine-tuning (SFT) has become standard practice, domain excellence especially in multi-step reasoning, mathematical proofing, and autonomous tool use requires RL.

Historically, it's been difficult to bridge the world of ML experimentation with production Kubernetes fleets. ML researchers want to iterate rapidly in Python and PyTorch by using standard reward functions, while platform teams need multi-tenant governance, quota enforcement, and predictable scheduling.

To eliminate this friction, Google created OpenRL and contributed it to the CNCF Sandbox.

Architectural highlights of OpenRL

Distributed inference at scale with llm-d 1.0

After you post-train a model, serving it serving it under interactive, bursty agent traffic presents a new set of distributed systems challenges. Standard ingress controllers treat LLM traffic as stateless HTTP requests, scattering sequential turns across different replicas and constantly rebuilding KV cache.

Google Cloud, Red Hat, IBM Research, CoreWeave, and NVIDIA co-founded the project, with contributions from over 500 engineers across 25+ organizations. Today, llm-d 1.0 is the CNCF Sandbox distributed inference control plane that transforms standalone inference engines (like vLLM and SGLang) into a coordinated, cluster-wide serving fabric.

code_block <ListValue: [StructValue([('code', 'apiVersion: inference.networking.x-k8s.io/v1alpha1\r\nkind: InferencePool\r\nmetadata:\r\n name: gemma-serving-pool\r\n namespace: ai-serving\r\nspec:\r\n targetRef:\r\n group: apps\r\n kind: Deployment\r\n name: vllm-gemma-27b\r\n scheduling:\r\n # Routes multi-turn requests to replicas holding matching KV context\r\n strategy: PrefixCacheAware\r\n fallback: LeastQueueDepth\r\n observability:\r\n kvCacheSyncInterval: "50ms"'), ('language', ''), ('caption', <wagtail.rich_text.RichText object at 0x7f32213bb210>)])]>

Core capabilities of llm-d 1.0

  1. Prefix-cache-aware routing (Endpoint Picker): The Endpoint Picker integrates into the Kubernetes Gateway API Inference Extension, and GKE manages it natively through GKE Inference Gateway. The Endpoint Picker evaluates real-time KV cache residency across worker pods. In production deployments, it's doubled KV cache hit rates from 35% to 70% and cut median time-to-first-token (TTFT) by 70-85% on multi-turn agent workloads.

  2. 3-Tier KV cache offload: When accelerator high-bandwidth memory (HBM) nears capacity during long-context interactions, llm-d cascades KV cache blocks from HBM → host CPU RAM → local NVMe SSD / Google Cloud Managed Lustre / Cloud Storage. This offload prevents expensive context recalculations.

  3. EPD Disaggregation with DisaggregatedSet: Decouples Encoding, Prefill, and Decode (EPD) onto specialized hardware pools that are connected by high-speed interconnects. DisaggregatedSet is built built on Kubernetes LeaderWorkerSet (LWS). It enables independent horizontal scaling and coordinated, zero-downtime rolling upgrades.

  4. Native TorchTPU upstream support: PyTorch models run natively on Google Cloud TPUs inside upstream vLLM and SGLang through TorchTPU. Developers get day-zero parity across TPU v5e, v6e, and v7x alongside NVIDIA GPUs without the need to maintain private forks or rewrite pipelines.

  5. Latency-tolerant async processing & flow control: The llm-d-async-processor component pulls background, latency-tolerant tasks from Pub/Sub or Redis into cluster slack capacity. It applies strict traffic prioritization so background processing never degrades interactive user experiences.

  6. Fleet observability with Prism: Track cluster-wide throughput, inter-token latency (ITL), TTFT, and cache hit ratios by using Prism, the llm-d open-source benchmarking and performance dashboard.

Distributed Python & ML orchestration with KubeRay

While specialized runtimes handle inference and RL loops, distributed data preparation, embedding generation, and distributed PyTorch training depend heavily on Ray.

KubeRay provides an open-source, Kubernetes-native operator that manages the complete lifecycle of Ray clusters, jobs, and services (RayCluster, RayJob, and RayService custom resources) on Kubernetes.

code_block <ListValue: [StructValue([('code', 'apiVersion: ray.io/v1\r\nkind: RayJob\r\nmetadata:\r\n name: gemma-fine-tune-job\r\n namespace: ai-workloads\r\n labels:\r\n kueue.x-k8s.io/queue-name: ml-team-queue\r\nspec:\r\n shutdownAfterJobFinishes: true\r\n ttlSecondsAfterFinished: 60\r\n entrypoint: python fine_tune_gemma.py --model-id google/gemma-2-27b-it\r\n runtimeEnvYAML: |\r\n pip:\r\n - datasets==2.18.0\r\n - transformers==4.40.0\r\n - torch==2.2.0\r\n rayClusterSpec:\r\n rayVersion: "2.35.0"\r\n headGroupSpec:\r\n rayStartParams:\r\n dashboard-host: "0.0.0.0"\r\n template:\r\n spec:\r\n containers:\r\n - name: ray-head\r\n image: rayproject/ray-ml:2.35.0\r\n resources:\r\n limits:\r\n cpu: "4"\r\n memory: "16Gi"\r\n requests:\r\n cpu: "2"\r\n memory: "8Gi"\r\n workerGroupSpecs:\r\n - groupName: gpu-workers\r\n replicas: 4\r\n minReplicas: 1\r\n maxReplicas: 8\r\n rayStartParams: {}\r\n template:\r\n spec:\r\n containers:\r\n - name: ray-worker\r\n image: rayproject/ray-ml:2.35.0\r\n resources:\r\n limits:\r\n nvidia.com/gpu: "1"\r\n cpu: "8"\r\n memory: "32Gi"\r\n requests:\r\n nvidia.com/gpu: "1"\r\n cpu: "4"\r\n memory: "16Gi"'), ('language', ''), ('caption', <wagtail.rich_text.RichText object at 0x7f32209ac690>)])]>

Why KubeRay matters for platform teams

Strong isolation for AI agents: Agent Substrate & gVisor

As multi-turn AI agents advance from conversational assistants to autonomous systems that generate code, execute shell commands, and orchestrate external APIs running untrusted, model-generated code in shared clusters introduces serious security risks.

Google Cloud is contributing Agent Substrate and continuing core contributions to gVisor in the CNCF Sandbox:

Proven in practice: Mastering domain reasoning

To evaluate this complete open-source stack on a rigorous enterprise workload, we tested Gemma 4 against the open-source Legal Agent Benchmark (LAB) developed by Harvey.ai. This benchmark spans 24 complex legal practice areas from mergers and acquisitions (M&A)M&A due diligence to contract dispute analysis. The evaluation produced these results:

How teams are adopting this stack

Organization persona

Core challenge

Architecture with OpenRL + llm-d + KubeRay + Gemma

Enterprise platform teams

Manage multiple internal ML squads without fragmented Slurm/Ray clusters or runaway hardware bills.

Transform existing GKE clusters into self-hosted Reinforcement Learning-as-a-Service (RLaaS) by using DRA, Kueue, and accelerator time-slicing.

Regulated enterprises (finance, healthcare, legal)

Intellectual property (IP), compliance, and privacy mandates prohibit sending proprietary data to third-party public APIs.

Post-train and serve 1B-30B Gemma models completely inside a private Virtual Private Cloud (VPC) with domain-specific reward functions for superior task accuracy and lower total cost of ownership (TCO).

AI-native builders & agent developers

High serving costs and latency bottlenecks on long-context, multi-turn agent interactions.

Deploy llm-d prefix-cache routing that's paired with gVisor-isolated Agent Sandbox execution targets.

Model-as-a-Service & neocloud providers

Deliver high-margin, multi-tenant post-training and inference across diverse hardware fleets.

Expose OpenRL’s multi-tenant APIs and llm-d’s multi-accelerator control plane across mixed GPU and TPU clusters.

Connect with us at KubeCon North America 2026

Attending KubeCon NA in Salt Lake City? Come see these open-source technologies in action:

Get started

  1. Explore OpenRL: Visit openrl.dev and check out the OpenRL GitHub repository for Kubernetes-native RL fine-tuning recipes.

  2. Deploy llm-d 1.0: Head to llm-d.ai to test Gateway API Inference extensions and deploy prefix-aware inference pools on your clusters.

  3. Run KubeRay: Follow the KubeRay documentation to manage distributed Ray workloads alongside Kueue.

  4. Deploy Gemma on GKE: Explore step-by-step guides for deploying Gemma models on TPUs and GPUs in the Google Kubernetes Engine documentation.

Originally published by Google Cloud Blog ↗ · rebuilt here from its own full-text RSS feed · all rights remain with the publisher, please read and support them there.