Kubernetes and LLM Serving Frameworks
LLM Inference in 2025 is a race to pump as many tokens as quickly as possible at minimum cost.
Multiple techniques have emerged in support of this effort: KV caching, prefill/decode disaggregation, and smart routing, to name a few.
While many parts of the stack can be used “a la carte”, up and coming frameworks provide “batteries included” opionated stacks with key functionality.
I spent a few days experimenting with disaggregated serving and frameworks to support inference on Kubernetes.
In this doc: how to deploy each framework, light pros/cons, example models. Not in this doc: detailed benchmarks, examples of complete fancy functionality.
What does it take to run a model?
Inference starts with a model and a serving backend. We can scale to multiple instances and add a load balancer/router. With multiple model instances, we may want caching for model weights and autoscaling support. To increase efficiency and reduce tail latency, we may want to split prefill and decode stages into separate instances, requiring KV cache transfer and coordination across instances. And we may want to save KV cache from prefill for reuse on future requests, even across nodes. The largest models today do not fit in a single node of H200 GPUs, so multinode serving support is an increasingly useful capability, ideally supporting all the same functionality.
In list form:
- Load balancer/router
- Model server
- Model weights/artifact management
- KV cache offload + distributed KV caching
- Prefill/decode disaggregation
- Multinode inference
vLLM and SGlang have emerged as two of the most popular model servers recently. Both Github orgs now maintain frameworks for model serving on top of Kubernetes: AIBrix (vLLM) and OME (SGlang). AIBrix traces its lineage to ByteDance, while OME has heavy usage in Oracle.
The Kubernetes community is also eager to support AI workloads with efforts like llm-d. llm-d has first class support for vLLM out of the box, but is adaptable to any serving backend. In fact, all three frameworks can be adapted to either vLLM or SGLang.
Nvidia has also thrown their hat in the ring with Dynamo, which also supports multiple serving backends, while bringing its own KV cache manager, smart router, and planner for scaling decisions. Nvidia’s NIXL has also rapidly become a de facto standard for data transfer in these scenarios.
Where are these approaches similar? Where are they different? What’s good and bad? Let’s dive in.
llm-d
llm-d is a loose association of existing Kubernetes resources and a minimal wrapping layer on top. In its current form this is a “Model Service” Kubernetes custom resource definition, but it will likely turn into a helm chart.
See the below diagram and North Star design doc
Example Model
Note the ModelService references baseConfigMapRef which contains preset templates for the underlying Kubernetes resources (Deployments, Services, LeaderWorkerSets)
I deployed both Cohere’s Command-A and Kimi-K2. Kimi-K2 is a large model, and for this experiment I wanted to run it with TP16 across 2x H200 nodes with 8 GPUs each. I patched the llm-d-model-service controller to support this, building on an existing PoC from an open source contributor. See here for the PR and here for details of the base LeaderWorkerSet config. That PR will likely be unnecessary due to the proposal to replace the controller with a helm chart.
This example also assumes weights have been pre-downloaded to a PVC, as llm-d does not currently (as far as I know) have managed model caching out of the box.
By default the deployed llm-d-inference-gateway is private. I use Traefik as my ingress controller so fronted the llm-d-gateway with Traefik, which points to the llm-d-gateway. This is probably not optimal.
Additionally, it is not clear to me why the ClusterRoleBinding must be deployed manually while the Service Account is currently reconciled. HTTPRoute can be auto-created but I’ve applied it manually here. Little issues like this would go away if it’s converted fully to a local chart.
Also note, due to using PVC with local path, the model served name includes the absolute model path currently.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cmd-a-endpoint-picker
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: llm-d-modelservice-epp-metrics-scrape
subjects:
- kind: ServiceAccount
name: cmd-a-epp-sa
namespace: llm-d
---
apiVersion: llm-d.ai/v1alpha1
kind: ModelService
metadata:
name: cmd-a
namespace: llm-d
spec:
decoupleScaling: false # true allows for HPA control over replica counts. NOT related to p/d.
baseConfigMapRef:
name: lws-baseconfig-simple
routing:
modelName: CohereLabs/c4ai-command-a-03-2025
ports:
- name: app_port
port: 8000
- name: internal_port
port: 8200
modelArtifacts:
uri: pvc://model-storage/CohereLabs/c4ai-command-a-03-2025
authSecretName: llm-d-hf-token
# describe decode pods
decode:
containers:
- name: vllm-worker
mountModelVolume: true
replicas: 1
parallelism:
tensor: 8
data: 1
acceleratorTypes:
labelKey: gpu.nvidia.com/model
labelValues:
- H200
# describe the prefill pods
prefill:
containers:
- name: vllm-worker
mountModelVolume: true
replicas: 1
parallelism:
tensor: 8
data: 1
acceleratorTypes:
labelKey: gpu.nvidia.com/model
labelValues:
- H200
---
apiVersion: networking.istio.io/v1
kind: DestinationRule
metadata:
name: cmd-a-insecure-tls
namespace: llm-d
spec:
host: cmd-a-epp-service
trafficPolicy:
tls:
insecureSkipVerify: true
mode: SIMPLE
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: cmd-a
namespace: llm-d
spec:
parentRefs:
- name: llm-d-inference-gateway
rules:
- backendRefs:
- group: inference.networking.x-k8s.io
kind: InferencePool
name: cmd-a-inference-pool
port: 8000
matches:
- path:
type: PathPrefix
value: /cmd-a
filters:
- type: URLRewrite
urlRewrite:
path:
type: ReplacePrefixMatch
replacePrefixMatch: /
timeouts:
backendRequest: 0s
request: 0s
Sending requests:
$ curl -sS -X GET https://infer.acebutt.xyz/cmd-a/v1/models | jq
{
"object": "list",
"data": [
{
"id": "/model-cache/CohereLabs/c4ai-command-a-03-2025",
"object": "model",
"created": 1753220035,
"owned_by": "vllm",
"root": "/model-cache/CohereLabs/c4ai-command-a-03-2025",
"parent": null,
"max_model_len": 131072,
"permission": [
{
"id": "modelperm-a764c49416744fecb3aa849644d21817",
"object": "model_permission",
"created": 1753220035,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
]
}
]
}
$ curl -sS -X POST https://infer.acebutt.xyz/cmd-a/v1/completions \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"model":"/model-cache/CohereLabs/c4ai-command-a-03-2025",
"prompt":"Who are you?"
}' | jq '.choices[0].text'
Dependencies
- Kubernetes Gateway API with Experimental channel
- Gateway API Inference extension
- Adds InferencePool, InferenceModel CRDs
- Adds Endpoint Picker Extension — crucial!
- Gateway controller with support for AI extension (istio, kgateway known support)
Deploying a Model Service (or soon, a helm chart) with p/d disaggregation creates (as one example):
- 1 Kubernetes deployment/svc each for prefill/decode.
- 1 InferenceModel + InferencePool.
- The inference pool has a selector mapped to the prefill/decode pods.
- 1 Kubernetes deployment/service for the endpoint picker.
You can adjust base presets for decode/prefill deployments, scale them independently, and hook autoscalers into model server metrics.
Pros
- llm-d was the easiest to deploy, because there’s almost nothing to deploy besides a thin layer of upstream k8s oss.
- Very flexible, because you’re very nearly editing raw underlying kubernetes manifests or templating them.
- Only standardized routing/load balancer (whether that’s a pro/con is debatable)
- Minimal functional support for model caching via PVC.
- Some KV cache support via lmcache + redis.
Cons
- No clear method for multi-model routing behind shared hostname without custom headers/paths?
- This might be user error.
- No orchestration for artifact download caching. minimal support for mounting preconfigured PVC with storage.
- No native support yet for LeaderWorkerSet or other multi-node serving paradigms
- Likely to change with helm chart switch.
- I PoC’d a version of the controller here with primitive support (there are bugs).
- Minimal out of the box KV cache support, but flexibility to configure it.
- vLLM multinode TP with LMCache seems to crash on initialization.
- Crashes with nixl/lmcache connectors (potentially on aborted requests only).
error stack
2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] EngineCore encountered a fatal error. 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] Traceback (most recent call last): 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] File "/workspace/vllm/vllm/v1/engine/core.py", line 482, in run_engine_core 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] engine_core.run_busy_loop() 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] File "/workspace/vllm/vllm/v1/engine/core.py", line 507, in run_busy_loop 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] self._process_input_queue() 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] File "/workspace/vllm/vllm/v1/engine/core.py", line 528, in _process_input_queue 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] self._handle_client_request(*req) 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] File "/workspace/vllm/vllm/v1/engine/core.py", line 546, in _handle_client_request 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] self.abort_requests(request) 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] File "/workspace/vllm/vllm/v1/engine/core.py", line 198, in abort_requests 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] self.scheduler.finish_requests(request_ids, 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] File "/workspace/vllm/vllm/v1/core/sched/scheduler.py", line 858, in finish_requests 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] self._free_request(request) 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] File "/workspace/vllm/vllm/v1/core/sched/scheduler.py", line 864, in _free_request 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] delay_free_blocks, kv_xfer_params = self._connector_finished(request) 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] File "/workspace/vllm/vllm/v1/core/sched/scheduler.py", line 942, in _connector_finished 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] block_ids = self.kv_cache_manager.get_block_ids(request.request_id) 2025-07-19 23:16:55.639Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-07-19 23:16:55.640Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] File "/workspace/vllm/vllm/v1/core/kv_cache_manager.py", line 359, in get_block_ids 2025-07-19 23:16:55.640Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] assert request_id in self.single_type_manager.req_to_blocks 2025-07-19 23:16:55.640Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-07-19 23:16:55.640Z vllm-worker ERROR 07-19 23:16:55 [core.py:491] AssertionError 2025-07-19 23:16:55.640Z vllm-worker ERROR 07-19 23:16:55 [async_llm.py:403] AsyncLLM output_handler failed. 2025-07-19 23:16:55.640Z vllm-worker ERROR 07-19 23:16:55 [async_llm.py:403] Traceback (most recent call last): 2025-07-19 23:16:55.640Z vllm-worker ERROR 07-19 23:16:55 [async_llm.py:403] File "/workspace/vllm/vllm/v1/engine/async_llm.py", line 361, in output_handler 2025-07-19 23:16:55.640Z vllm-worker ERROR 07-19 23:16:55 [async_llm.py:403] outputs = await engine_core.get_output_async() 2025-07-19 23:16:55.640Z vllm-worker ERROR 07-19 23:16:55 [async_llm.py:403] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-07-19 23:16:55.640Z vllm-worker ERROR 07-19 23:16:55 [async_llm.py:403] File "/workspace/vllm/vllm/v1/engine/core_client.py", line 806, in get_output_async 2025-07-19 23:16:55.640Z vllm-worker ERROR 07-19 23:16:55 [async_llm.py:403] raise self._format_exception(outputs) from None 2025-07-19 23:16:55.640Z vllm-worker ERROR 07-19 23:16:55 [async_llm.py:403] vllm.v1.engine.exceptions.EngineDeadError: EngineCore encountered an issue. See stack trace (above) for the root cause.
AIBrix
AIBrix architecturally looks similar to llm-d, but adds many custom layers of management.
- StormService: abstracts over the unit of work for a model server, replacing e.g. Kubernetes deployments and managing pods directly.
- Router: uses Envoy Gateway with custom load balancing plugins, similar to endpoint picker extension.
- KV cache offload framework: AIBrix has a native concept of L1 (DRAM) and L2 (backend storage) distributed KV cache.
- Autoscaling: supports HPA, Knative autoscaler, and custom AIBrix “advanced pod autoscaler”.
- Engine runtime: sidecar to underlying model server for advanced functionality like model load/unload, metrics normalization across backends.
- Multinode inference: vLLM uses Ray today for multinode support, and AIBrix natively wraps Ray for this purpose.


Example Model
This example is almost copied directly from the AIBrix docs, edited to use Cohere’s Command A model from Hugging Face.
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
model.aibrix.ai/name: cmd-a # Note: The label value `model.aibrix.ai/name` here must match with the service name.
model.aibrix.ai/port: "8000"
name: cmd-a
namespace: default
spec:
replicas: 1
selector:
matchLabels:
model.aibrix.ai/name: cmd-a
template:
metadata:
labels:
model.aibrix.ai/name: cmd-a
spec:
containers:
- command:
- python3
- -m
- vllm.entrypoints.openai.api_server
- --host
- "0.0.0.0"
- --port
- "8000"
- --uvicorn-log-level
- warning
- --model
- CohereLabs/c4ai-command-a-03-2025
- --served-model-name
# Note: The `--served-model-name` argument value must also match the Service name and the Deployment label `model.aibrix.ai/name`
- cmd-a
- --max-model-len
- "128000" #
image: vllm/vllm-openai:v0.7.1
env:
- name: HF_TOKEN
valueFrom:
secretKeyRef:
key: token
name: hf-token
imagePullPolicy: IfNotPresent
name: vllm-openai
ports:
- containerPort: 8000
protocol: TCP
resources:
limits:
nvidia.com/gpu: "4"
requests:
nvidia.com/gpu: "4"
ephemeral-storage: "1000Gi"
livenessProbe:
httpGet:
path: /health
port: 8000
scheme: HTTP
failureThreshold: 3
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /health
port: 8000
scheme: HTTP
failureThreshold: 5
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 1
startupProbe:
httpGet:
path: /health
port: 8000
scheme: HTTP
failureThreshold: 30
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 1
---
apiVersion: v1
kind: Service
metadata:
labels:
model.aibrix.ai/name: cmd-a
prometheus-discovery: "true"
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
name: cmd-a # Note: The Service name must match the label value `model.aibrix.ai/name` in the Deployment
namespace: default
spec:
ports:
- name: serve
port: 8000
protocol: TCP
targetPort: 8000
- name: http
port: 8080
protocol: TCP
targetPort: 8080
selector:
model.aibrix.ai/name: cmd-a
type: ClusterIP
Sending requests:
$ curl -sS -X GET https://aibrix.acebutt.xyz/v1/models | jq
{
"object": "list",
"data": [
{
"id": "cmd-a",
"created": 0,
"object": "model",
"owned_by": "aibrix"
}
]
}
$ curl -sS -X POST https://aibrix.acebutt.xyz/v1/completions \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"model":"cmd-a",
"prompt":"Who are you?"
}' | jq '.choices[0].text'
Dependencies
AIBrix packages all dependencies with the default install. As a matter of preference I split them out and installed them manually. This was non-trivial compared to other installs.
- Gateway API
- Envoy Gateway
- Example Install
- I’ve customized this heavily to remove Gateway API CRDs to allow them to be installed separately.
- KubeRay Custom Resource Definitions (only - no operator)
- Example Install
- Only these 3, extracted from upstream KubeRay charts.
Pros
- Tightly integrated support for all key functionality.
- Model name registration/routing out of the box with OpenAI API, auto-detected from deployed resources.
- LoRA support with custom k8s service integration to manually update LoRA endpoints based on model loading in backend pods.
- Native KV cache offload with distributed backend support.
- S3 backend support for model downloads in addition to Hugging Face.
- Generally decent documentation.
Cons
- Distributed KV cache support has limited supported backends out of the box and is totally custom.
- Multinode serving support is not much better than deploying equivalent manifests manually.
- Model artifact caching support only seems to support hostPath.
OME
OME sits somewhere between llm-d and AIBrix architecturally. It implements its own CRDs (like AIBrix), but sticks closer to upstream Kubernetes standards (like llm-d). At this point you should see some patterns emerging.
OME brings a few new concepts:
- BaseModel: defines a model artifact, how to download it, node selectors for caching, and architectural details for serving.
- ServingRuntime: defines base pod/container config for models matching architecture selectors defined by the runtime.
- InferenceService: defines a BaseModel and ServingRuntime to compose, plus scaling configuration and prefill/decode split (or not).
- BenchmarkJob: for benchmarking. SGLang has a nice benchmarking tool,
genai-bench. - Optional router with cache aware load balancing.
- Model agent for caching model downloads on hosts proactively.
Example Model
This example defines two versions of llama 3.1 70b, one with vLLM and one with SGLang serving runtimes. They share the base model. They use hostPath for model caching, coordinated by OME prior to permitting pod startup.
This example assumes an HF token in a secret in the OME namespace, and a Traefik Gateway deployment.
Routing in this example uses the HTTP Header Model: $NAME to route to backends.
apiVersion: v1
kind: Namespace
metadata:
name: llama-70b-demo
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: model-storage
namespace: llama-70b-demo
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Ti
storageClassName: shared-vast
volumeName: model-storage
---
apiVersion: ome.io/v1beta1
kind: ClusterBaseModel
metadata:
name: llama-3-1-70b-instruct
spec:
vendor: meta
disabled: false
version: "1.0.0"
displayName: meta.llama-3.1-70b-instruct
storage:
storageUri: hf://meta-llama/Llama-3.1-70B-Instruct
nodeSelector:
gpu.nvidia.com/model: H200
path: /mnt/local/models/meta-llama/Llama-3.1-70B-Instruct
key: hf-token # secret with this name must be predefined in OME namespace with `token: $HF_TOKEN` as content
modelFramework:
name: transformers
version: "4.47.0.dev0"
modelFormat:
name: safetensors
version: "1.0.0"
modelArchitecture: LlamaForCausalLM
---
apiVersion: ome.io/v1beta1
kind: InferenceService
metadata:
name: llama-3-1-70b-instruct-srt
namespace: llama-70b-demo
spec:
model:
name: llama-3-1-70b-instruct
engine:
minReplicas: 1
maxReplicas: 1
runtime:
name: srt-llama-3-3-70b-instruct
---
apiVersion: ome.io/v1beta1
kind: InferenceService
metadata:
name: llama-3-1-70b-instruct-vllm
namespace: llama-70b-demo
spec:
model:
name: llama-3-1-70b-instruct
engine:
minReplicas: 1
maxReplicas: 1
runtime:
name: vllm-llama-3-3-70b-instruct
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: llama-3-1-70b-instruct
namespace: llama-70b-demo
spec:
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: traefik-gateway
namespace: traefik
hostnames:
- ome.acebutt.xyz
rules:
- matches:
- path:
type: PathPrefix
value: /
headers:
- name: Model
value: llama-3-1-70b-instruct-srt
backendRefs:
- name: llama-3-1-70b-instruct-srt-engine
port: 8080
weight: 1
- matches:
- path:
type: PathPrefix
value: /
headers:
- name: Model
value: llama-3-1-70b-instruct-vllm
backendRefs:
- name: llama-3-1-70b-instruct-vllm-engine
port: 8080
weight: 1
Sending requests:
$ curl -H "Model: llama-3-1-70b-instruct-srt" -X GET "https://ome.acebutt.xyz/v1/models"
$ curl -H "Model: llama-3-1-70b-instruct-srt" -X POST "https://ome.acebutt.xyz/v1/chat/completions" \
-H "Content-Type: application/json" \
-d '{
"model": "llama-3-2-1b-instruct",
"messages": [
{"role": "user", "content": "Hello! Can you introduce yourself?"}
],
"max_tokens": 100,
"temperature": 0.7
}'
Dependencies
The only required dependency for OME is cert-manager and Kubernetes >= 1.27. There are multiple optional components depending on desired features.
- Istio and/or Knative Serving: serverless mode
- KEDA and Prometheus: custom metrics and autoscaling
- LeaderWorkerSet: multinode serving
- Kueue: gang scheduling with quota constraints
Pros
- Broad feature support for desired functionality with thin layer over Kubernetes OSS.
- Supports model caching out of the box.
- Supports multinode serving out of the box.
Cons
- No clear method for multi-model routing behind shared hostname without custom headers/paths.
- Documentation is lacking, out of date, or wrong.
- Support for specific models requires a loader in code to parse details from HF exports.
- Easy to add, but needs to be done.
- ref: https://github.com/sgl-project/ome/blob/90a66560d8fff0d83c576481b2e1991fe9cf31b9/pkg/hfutil/modelconfig/kimi_k2.go
- Exclusively supports HF downloads to host cache today, PVC caching support in progress.
- Custom HF hub client doesn’t seem to handle redirects correctly while curl does
- Unclear from inspecting code why this would be the case.
- Discovered while trying to use
hf://meta-llama/Meta-Llama-3.1-70B-Instructbut the model redirects to the new name,hf://meta-llama/Llama-3.1-70B-Instruct - Maybe user error?
- I work at Cohere and the loader doesn’t support Cohere models (cry).
What else?
We haven’t covered Dynamo, which has several interesting components, like the planner for intelligent prefill/decode autoscaling.
We also haven’t benchmarked any configurations, with our without prefill/decode split or distributed KV caching with any fancy backends.