Kubernetes for open-source AI tools: running Dify, Langfuse, LiveKit and dstack at scale in 2026
What Kubernetes does
Kubernetes, released by Google in 2014 and now maintained by the Cloud Native Computing Foundation, turns a group of machines into one pool of capacity. You describe what should run, such as three replicas of a web service, two workers, and a model server needing one GPU, and Kubernetes schedules containers onto nodes, restarts them if they fail, routes traffic, and rolls out new versions gradually. Helm charts package an application's Kubernetes configuration so it installs with one command and a values file.
Which directory projects support it
| Project | Kubernetes support |
|---|---|
| Dify | Community Helm charts and deployment guidance; enterprise edition ships Kubernetes packages |
| Langfuse | Official Helm chart with web and worker deployments, plus Terraform modules for EKS, GKE and AKS |
| LiveKit | Official Helm chart for media servers, with guidance on host networking and ports for real-time audio and video |
| dstack | Orchestrates GPU dev environments, training and inference on Kubernetes clusters and cloud GPUs |
Kubernetes 1.37
Kubernetes ships three minor releases a year. Kubernetes 1.37.1, on September 15, 2026, made 1.37 the newest supported minor line. Each minor version is supported for about 14 months, so a cluster on 1.34 or older should be planning upgrades. Patch releases also carry Go toolchain updates; in February 2026, for example, 1.35.2 was an out-of-band patch to pick up Go security fixes.
Recent releases have steadily improved AI workload support:
| Feature | Status | Why it matters for AI |
|---|---|---|
| Dynamic Resource Allocation | GA since 1.34 | Request GPUs by type, memory or partition, and share devices between pods |
| In-place pod resize | GA in 2025 releases | Change CPU and memory without restarting a model server |
| Sidecar containers | GA since 1.33 | Clean support for proxies and log shippers next to inference servers |
| Image volumes | Maturing | Mount model weights packaged as OCI images without copying them into the app image |
GPUs on Kubernetes
Running models on Kubernetes starts with GPU nodes:
- Create a node pool with GPU instances.
- Install the NVIDIA GPU Operator, which manages drivers, the container toolkit, the device plugin and monitoring, or use the managed equivalent on GKE and EKS.
- Request GPUs in pod specs with
nvidia.com/gpu: 1, or through Dynamic Resource Allocation claims. - Use taints so only GPU workloads land on expensive GPU nodes.
To share GPUs, use NVIDIA's Multi-Instance GPU on supported cards for hard isolation, or time-slicing for development workloads. Kueue manages queues and quotas for batch jobs across teams.
Serving models on Kubernetes
| Tool | What it does |
|---|---|
| vLLM production stack | Helm-based deployment of vLLM with routing and caching |
| KServe | Standard model serving with autoscaling, now including LLM features |
| llm-d | Distributed inference from Red Hat, Google, IBM and others, with prefix-cache-aware routing |
| Gateway API Inference Extension | Kubernetes-native routing that sends requests to the model server with the right cache and load |
| Ollama Helm charts | Simple local-model serving for internal tools |
Model weights are large, so cache them on fast local disks or a shared volume, and use readiness probes so pods receive traffic only after the model has loaded.
Running AI platforms on Kubernetes
For Dify, Langfuse and similar platforms, a production layout looks like this:
- Stateless services, such as web, API and workers, as Deployments with several replicas.
- Horizontal Pod Autoscalers on workers, scaling on CPU or queue length with KEDA.
- Managed PostgreSQL, Redis and object storage outside the cluster.
- An ingress controller or Gateway API with TLS from cert-manager.
- Secrets from a secret manager through the External Secrets Operator.
- Network policies that block pods from reaching anything they do not need.
Keeping databases outside the cluster makes upgrades and disaster recovery much simpler for teams without deep Kubernetes experience.
Managed Kubernetes options
| Service | Notes |
|---|---|
| Amazon EKS | Deep AWS integration; Auto Mode manages nodes; see the AWS stack page |
| Google GKE | Autopilot mode, strong GPU and TPU support; see the Google Cloud stack page |
| Azure AKS | Integration with Azure AI services |
| GPU clouds | CoreWeave, Lambda, Nebius and others offer Kubernetes with GPU capacity |
| Smaller clouds | DigitalOcean, Linode, Scaleway, Civo: simpler and cheaper for CPU workloads |
When Kubernetes is worth it
| Situation | Recommendation |
|---|---|
| One team, one AI platform, modest traffic | Docker Compose on a single server |
| Need for uptime during upgrades and node failures | Kubernetes with replicas |
| Several AI services and shared GPUs | Kubernetes |
| Platform team already runs Kubernetes | Kubernetes |
| Bursty agent or batch workloads | Kubernetes with autoscaling, or serverless platforms |
Kubernetes adds real operating work: upgrades three times a year, add-ons to maintain, and a learning curve. Count that time in the cost.
Upgrading AI workloads safely
Upgrades are where Kubernetes clusters most often break. Before moving to a new minor version, check the deprecation guide for removed APIs, update Helm charts and operators such as the GPU Operator to versions that support the target release, and upgrade a staging cluster first. Upgrade the control plane, then node pools one at a time, using PodDisruptionBudgets so at least one replica of each service stays up. Model servers take minutes to load weights, so give them generous termination and readiness settings; otherwise a rolling upgrade can briefly leave no ready replicas. GPU node pools often need a matching driver version, so read the managed provider's notes for GPU nodes before upgrading.
Cost control
GPU nodes are the main expense. Scale GPU node pools to zero when idle with the cluster autoscaler or Karpenter, use spot or preemptible GPU instances for batch jobs and evaluations that can restart, and right-size requests so a small model does not reserve a whole large GPU. Tools such as OpenCost show spend per namespace and team.
Security
- Use role-based access control with least privilege, and do not give CI systems cluster-admin.
- Apply Pod Security Standards so containers cannot run privileged by default.
- Isolate agent sandboxes that execute generated code with gVisor, Kata Containers or separate node pools.
- Keep the cluster and add-ons patched; many incidents start from exposed dashboards or outdated controllers.
- Scan images and pin them by digest for production.
Observability
Prometheus and Grafana cover cluster and GPU metrics through the DCGM exporter, while LLM-specific tracing tools such as Langfuse and OpenTelemetry instrumentation cover prompts, tokens and costs. Watch GPU utilization closely: idle GPUs are the largest waste in most AI clusters.
Related: Docker stack, AWS stack, Google Cloud stack, Langfuse stack, Go stack, Stack index.
Frequently asked questions
Do I need Kubernetes to self-host AI tools?
No. A single server with Docker Compose runs Dify, Langfuse or Open WebUI well for small and medium teams. Kubernetes becomes worthwhile when you need several replicas for uptime, autoscaling, many services managed together, GPU nodes shared across teams, or a platform team already runs it.
How do GPUs work in Kubernetes?
The NVIDIA GPU Operator installs drivers, the container toolkit and a device plugin on GPU nodes, so pods can request GPUs as a resource. Dynamic Resource Allocation, generally available since Kubernetes 1.34, lets pods request GPUs with specific properties and share them more flexibly. Time-slicing and Multi-Instance GPU split one GPU among several workloads.
How do I install Dify or Langfuse on Kubernetes?
Use the Helm chart. Langfuse publishes an official chart; Dify has community-maintained charts and official guidance. In production, point the chart at managed PostgreSQL, Redis and object storage rather than running databases inside the cluster.
How often does Kubernetes release, and how long is each version supported?
Three minor versions a year, each supported by the project for about 14 months with patch releases. Managed services set their own support windows, often with paid extended support. Plan upgrades at least once a year.
What is the cheapest managed Kubernetes for AI tools?
For CPU workloads, smaller providers such as DigitalOcean, Linode, Scaleway and Hetzner-based offerings are cheapest, often with free control planes. For GPUs, compare per-hour GPU prices on GKE, EKS and AKS with GPU clouds such as CoreWeave, Lambda and Nebius, which also offer Kubernetes.