Key takeaways
Kubernetes coordinates AI infrastructure; it does not train models, improve their accuracy or automatically eliminate GPU waste.
Training, fine-tuning, batch inference and real-time serving need different scheduling and service policies.
Treat GPU memory, compute utilisation, queueing and model-loading time as separate engineering problems.
Use workload-aware scaling, capacity planning and admission policies together rather than relying on CPU utilisation alone.
Measure end-to-end business outcomes and cost at equivalent service quality before claiming infrastructure savings.
A managed AI service or a simpler deployment may be a better choice for a small, predictable workload.
The AI model works. So why is production still difficult?
Getting an AI model to produce a promising answer in a notebook is only the beginning. The harder question is whether that same model can serve customers throughout the day, meet response-time expectations, survive infrastructure failures and operate within an acceptable budget.
Consider the competing demands inside a bank. Its fraud analytics team periodically trains models on historical transaction data. A document-processing service runs large batches of invoices. An employee assistant needs immediate responses to policy questions. Each workload consumes computing resources differently, and each has a different tolerance for delay.
If every team owns a separate pool of graphics processing units (GPUs), some expensive machines may sit idle while another team waits for capacity. If all teams share hardware without clear rules, urgent production requests may compete with experimental training jobs. Neither arrangement is particularly attractive to a business.
Kubernetes for AI workloads addresses this infrastructure coordination problem. It provides a common mechanism for deploying containerised applications, allocating resources and managing their operating lifecycle. With suitable AI-specific components and controls, that foundation can help an organisation operate several models and applications without building an entirely separate infrastructure stack for each one.
The business opportunity is not Kubernetes adoption for its own sake. It is faster, more predictable delivery of AI capabilities while keeping infrastructure spending and operational risk under control.
What Kubernetes actually does for artificial intelligence
Think of Kubernetes as the coordination layer between AI applications and the machines that execute them. An application describes the resources and operating conditions it requires, and the platform attempts to maintain that desired state.
Pod: The basic scheduling unit containing one or more containers. A model-serving pod might run an inference server with its required CPU, memory and accelerator allocation.
Node: A physical or virtual machine providing the resources on which pods run. A cluster may contain general-purpose CPU nodes and several types of GPU nodes.
Deployment: A controller used to maintain a desired number of application replicas and manage updates. It is a common starting point for stateless model-serving endpoints.
Job: A controller for finite tasks such as batch scoring or a single-node training run. Distributed training may require an additional workload controller that coordinates multiple workers.
Service: A stable network endpoint that directs requests to eligible backend pods. The application or a gateway still needs to handle access controls and any model-specific request-routing decisions.
These primitives make deployment and operational behaviour more repeatable. They do not replace PyTorch or TensorFlow for model training, an inference runtime for generation, or a model registry and approval workflow for managing model versions.
Kubernetes supports GPU allocation through hardware-specific integrations, including vendor device plugins.[1] Administrators must still provide compatible hardware, drivers and runtime configuration. The platform is a foundation for AI operations, not a complete AI platform out of the box.
Not every AI workload should run the same way
An effective architecture begins with understanding the type of work the AI system performs. Applying an identical resource allocation and scaling policy to every model often creates unnecessary expense or unstable service.
Model training | Objective: Produce new model weights | Operating pattern: Long-running jobs with checkpointing, sufficient memory and coordinated worker placement | Main measures: Time to completion, cost per run and reproducibility.
Fine-tuning | Objective: Adapt a model to a specific domain or task | Operating pattern: Scheduled jobs with versioned training data and model artifacts | Main measures: Evaluation improvement, training cost and successful completion.
Batch inference | Objective: Process a large collection of records or documents | Operating pattern: Queued work, partitioned inputs and bounded parallel execution | Main measures: Completed items per hour, cost per accepted item and deadline compliance.
Real-time inference | Objective: Respond to user or application requests | Operating pattern: Ready serving replicas, controlled concurrency and demand-aware scaling | Main measures: Response latency, availability, throughput and output quality.
Embedding generation | Objective: Convert text or other content into vectors for search | Operating pattern: CPU or GPU services depending on model and volume, with batching where appropriate | Main measures: Throughput, retrieval effectiveness and cost per indexed item.
An organisation can run these workloads on a common platform without placing them in the same resource pool or assigning them identical priorities. Critical customer-facing endpoints may require reserved capacity, while non-urgent training can wait for available resources. Establish these business priorities before configuring the cluster.
GPU management: where infrastructure economics become real
Purchasing a GPU or renting one from a cloud provider does not mean that the application makes productive use of all its capabilities. A workload may reserve a complete device but spend much of its time waiting for data, processing a small batch or holding model weights in memory.
Start by measuring three different things: allocated GPU capacity, actual computational activity and device-memory consumption. A model that occupies substantial memory may perform relatively little computation between requests. An application can also be constrained by memory bandwidth, CPU preprocessing or storage rather than arithmetic performance.
In a standard device-plugin setup, Kubernetes schedules advertised GPU resources as discrete allocations.[1] It does not inherently divide a physical device into arbitrary fractions or guarantee performance isolation between applications sharing it.
Compatible GPUs and additional resource-management integrations can enable partitioning or sharing. Hardware partitioning, such as NVIDIA Multi-Instance GPU on supported devices, provides defined hardware resource partitions; time-slicing allows workloads to alternate access to a device. The two approaches have different memory, isolation and performance characteristics.
Choose GPU types according to measured model memory requirements, throughput, precision support, interconnect and cost. A smaller embedding model may not need an expensive accelerator, whereas a large language model may require multiple devices for its weights and runtime state.
For distributed training, placing workers close together on an appropriate network can be as important as acquiring more GPUs. A slow interconnect, insufficient storage throughput or poorly configured data pipeline can leave expensive hardware waiting. Benchmark scaling efficiency rather than assuming that twice as many devices will finish a job twice as fast.
Use shared capacity only where isolation and performance have been validated. A financial-services production endpoint should not lose predictable response times because a development team launched an intensive experiment on the same accelerator.
Why AI scheduling needs more than a standard cluster
The Kubernetes scheduler finds a suitable node for a pod according to resource requests and placement constraints. For a distributed training run that needs several workers at the same time, separately placing individual pods can lead to reserved capacity sitting unused while the remaining workers wait.
A workload admission layer can make resource allocation more deliberate. Kueue is a Kubernetes-native project that manages workload admission, quotas and queueing alongside existing scheduling and workload controllers.[2] It can help teams define capacity pools and decide when supported jobs should be permitted to start.
Separate the capacity that a team is entitled to use from capacity that physically exists at that moment. A queue may have quota available even when suitable GPU nodes are temporarily unavailable. Admission rules, topology-aware placement and node provisioning need to work together.
Define priority according to business impact. Production model serving may need protected resources; regulatory reporting may need a fixed completion deadline; experimentation may be permitted to wait. If you allow a higher-priority workload to interrupt training, ensure the training code can save and resume its progress.
Use distinct hardware pools when workloads have materially different requirements. For instance, a multi-GPU training job with demanding communication needs should not be treated as interchangeable with independent single-GPU inference replicas.
Capacity policies should be transparent to users. A data scientist needs to understand why a job is waiting, how much quota is available and whether a lower-cost hardware configuration is an acceptable alternative.
How to scale AI inference without losing control of the bill
Real-time inference is the part of AI infrastructure most visible to customers. Too few ready replicas create long queues and timeouts; too many leave costly hardware unused. Neither problem is solved simply by setting an autoscaling switch to on.
Kubernetes Horizontal Pod Autoscaling can adjust replica counts using resource or configured application metrics.[3] For model servers, the relevant signal may be waiting requests, concurrent sequences, token-processing load or model-runtime memory pressure rather than ordinary CPU utilisation.
An inference framework such as KServe can integrate with KEDA and runtime metrics to scale eligible model services. Its documented generative inference approach includes signals such as queued requests and key-value cache utilisation.[4] The right metric and threshold must be tested against the model and its actual traffic.
Scaling replicas and scaling machines are separate activities. A new replica needs an appropriate node with sufficient capacity. If none exists, a configured node autoscaler may attempt to provision additional machines, subject to provider availability and cluster limits.[5]
Large models also have a startup cost: downloading weights, loading them into memory, initializing the runtime and becoming ready to serve. A pod can be running without the model being capable of handling requests. Configure startup and readiness checks to reflect this distinction.[6]
For a latency-sensitive customer service, maintain enough warm capacity to absorb normal bursts and define a maximum acceptable queue size. Use controlled concurrency, request deadlines and backpressure when demand exceeds available capacity. Scaling to zero may suit a rarely used internal service, but only if its cold-start delay is acceptable.
Track both time to first token and end-to-end completion time for streaming LLMs. Benchmark with realistic input lengths, output lengths and simultaneous users. More tokens per second are useful only if customers receive correct, timely responses at a sustainable cost.
A practical enterprise architecture for Kubernetes-based AI
A reliable platform separates responsibilities instead of asking Kubernetes to solve every problem. The design should be understandable to engineering, risk, security and business teams alike.
Serving path: Application → authenticated API gateway → authorised model endpoint → inference runtime → scheduled compute resources → validated application response. Request authentication, business authorisation and output checks remain application or gateway responsibilities.
Training path: Approved training data → workflow or job submission → capacity admission and scheduling → training workers → durable checkpoints and artifacts → evaluation and model registry → approved deployment.
Compute layer: CPU and accelerator node pools, compatible drivers and device integrations, resource allocation, workload queues and node provisioning. Keep the number of platform components proportional to the scale of the problem.
Data and model layer: Versioned datasets, approved artifact repositories, secure model-weight storage and sufficiently fast data access. Store durable checkpoints and model artifacts outside disposable training pods, using approved persistent storage or object storage.
Operations layer: Central metrics, logs, traces, deployment automation, workload ownership, alerting and cost attribution. Capture enough information to identify which model version, runtime, container image and configuration produced a result.
Control layer: Identity, network access, policy enforcement, model approval, quotas and change management. Design rollback and failure recovery before accepting critical traffic.
This architecture is a design pattern, not a requirement to adopt every available cloud-native project. Select components based on your workloads, operating model and existing infrastructure. A platform that needs more specialist maintenance than the business can support is not necessarily an improvement.
A real banking example: improving the value of shared accelerator capacity
China Merchants Bank offers a useful example of the infrastructure challenge at enterprise scale. In September 2026, the Cloud Native Computing Foundation (CNCF) published a case study describing the bank's use of Kubernetes and complementary cloud-native projects to coordinate training, fine-tuning and online inference across heterogeneous accelerator hardware.[8]
The bank combined workload queueing, demand-driven inference scaling, accelerator allocation and faster access to model artifacts. Its approach treated training and serving as distinct operating patterns while allowing them to draw on a coordinated infrastructure platform.
CNCF reported that average accelerator compute utilisation increased from 35% to above 60%, while the inference cost for a million combined input and output tokens decreased by more than 60% under comparable model and service conditions. The bank also reported a fivefold increase in training density in its multi-tenant configuration, which reuses a common base model for five LoRA tenants.[8][9]
These are results reported for one organisation's combined platform and operating practices. They cannot be attributed to Kubernetes alone, and they are not a promise that another enterprise will achieve equivalent savings.
The broader lesson is that AI infrastructure optimisation requires coordinating multiple constraints: how jobs enter the system, how production demand changes, how hardware is allocated and how models and data reach the workers. A company facing similar bottlenecks should first measure its own utilisation, service quality and delivery costs.
Security, governance and reliability cannot be added at the end
An AI cluster may process customer records, confidential documents, proprietary model weights and privileged application credentials. A shared Kubernetes environment must therefore be designed around trust boundaries and business risk rather than convenience alone.
Use distinct service identities, least-privilege role-based access control, appropriate network policies supported by the cluster network implementation and secure secret management. Restrict what images and workloads may be deployed. Kubernetes namespaces are useful for organisation and policy, but they are not a complete security boundary on their own.[7]
Protect approved models and their associated data. Maintain traceable versions of model weights, training inputs, runtime configurations and deployment images. Restrict outbound connections so a workload cannot silently retrieve unapproved models or send sensitive data to an unauthorised destination.
Decide which teams may share nodes or devices. Where stronger isolation is required, use dedicated node pools, clusters or other suitable boundaries after evaluating the relevant threat model. Monitor changes to device-management components, since some require elevated host privileges.
Reliability must address both infrastructure and AI behaviour. A restarted container is not proof that an inference service produces valid answers. Use model-specific readiness checks, evaluation gates, canary deployments and a tested rollback to a previously approved combination of model and runtime.
Plan for hardware failure, capacity shortages, interrupted training and unavailable artifact storage. Preserve checkpoints, distribute critical serving replicas across appropriate failure domains and practise recovery within agreed service objectives. Protect logs and avoid recording confidential prompts or outputs unless there is an authorised operational need.
Kubernetes can support consistent enforcement and audit evidence, but it does not establish regulatory compliance, model fairness or the validity of AI decisions. Those require separate governance, independent testing and accountable business ownership.
How to decide whether the investment is worthwhile
Start with the business problem, not a cluster installation. Identify which AI services are expensive, difficult to deploy, unreliable or slow to scale. Determine whether these problems genuinely originate in infrastructure or in inefficient application and model design.
Establish a baseline that includes GPU allocation hours, compute activity, model-loading time, job waiting time, failed runs, serving latency, successful output volume and infrastructure spending. Measure outcomes by workload, not just at the cluster level.
For online inference, track total attributable operating cost divided by successful requests meeting the agreed quality and service criteria. For token-based services, compare cost per million tokens at similar model behaviour, traffic mix and latency. For training, use cost per successful run that reaches the required evaluation threshold.
Include the full cost of ownership: compute, storage, network traffic, control-plane charges, software, security operations, platform engineering, monitoring and incident response. Idle GPUs are only one part of the economics.
Pilot one bounded workload. Compare the new deployment with the existing approach using the same model, hardware class where possible, representative demand and acceptance criteria. Test sudden traffic increases, interrupted jobs, model rollbacks and unavailable GPU capacity before expanding.
Consider managed model APIs or managed training and serving platforms if demand is modest, the use case is narrow or there is no team to operate a cluster. Managed Kubernetes may reduce control-plane maintenance, but the organisation still needs to own its workload configuration, security and service performance.
Kubernetes becomes particularly compelling when several teams operate varied AI workloads, require consistent deployment controls or need to share scarce accelerators. It is less compelling when a simpler platform already meets quality, security and cost targets.
If your organisation is planning a shared AI platform or struggling with the cost and reliability of its existing models, begin with a focused assessment of workload patterns, model-serving requirements, infrastructure bottlenecks and operating responsibilities. The objective is to choose an architecture that delivers business value, not simply one that uses more technology.
References and further reading
[1] Kubernetes documentation. Schedule GPUs: device plugins and accelerator allocation. https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/
[2] Kueue documentation. Overview: workload admission, quotas and coordination with Kubernetes controllers. https://kueue.sigs.k8s.io/docs/overview/
[3] Kubernetes documentation. Horizontal Pod Autoscaling: replica scaling and custom metrics. https://kubernetes.io/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale/
[4] KServe documentation. Generative inference autoscaling with LLM metrics. https://kserve.github.io/website/docs/model-serving/generative-inference/autoscaling
[5] Kubernetes documentation. Node Autoscaling: capacity provisioning and consolidation. https://kubernetes.io/docs/concepts/cluster-administration/node-autoscaling/
[6] Kubernetes documentation. Liveness, Readiness, and Startup Probes. https://kubernetes.io/docs/concepts/workloads/pods/probes/
[7] Kubernetes documentation. Multi-tenancy: isolation considerations for shared clusters. https://kubernetes.io/docs/concepts/security/multi-tenancy/
[8] Cloud Native Computing Foundation (2026). China Merchants Bank: unified training and inference on Kubernetes. Published enterprise case study. https://www.cncf.io/case-studies/china-merchants-bank-2/
[9] CNCF End User Community. Unified Training and Inference on Kubernetes for Heterogeneous AI Compute at China Merchants Bank. Architecture and production outcomes. https://endusers.cncf.io/architectures/china-merchants-bank/
Apply the approach
Published enterprise evidence: China Merchants Bank coordinated AI training and inference on shared accelerator infrastructure using Kubernetes and complementary cloud-native projects. The CNCF case study reports the following outcomes from the bank's implementation under its own measurement conditions. These are case-specific results, not projected returns for every Kubernetes deployment.[8][9]
Reported change in average accelerator compute utilisation across the bank's shared platform.[8]
Reported reduction in cost per million combined input and output tokens for comparable models and service conditions.[8]
Reported improvement in the default five-tenant LoRA training configuration, which shares one base model rather than duplicating it across tenants.[9]
Put the approach into practice
- 01Catalogue AI services and classify each by hardware needs, workload type, business criticality and data restrictions.
- 02Measure existing GPU usage, application performance, service quality and full operating costs before choosing a platform.
- 03Pilot a clearly bounded workload using compatible hardware, a validated model runtime and explicit resource policies.
- 04Introduce workload queueing and demand-aware scaling where measured bottlenecks justify them; validate failure recovery and isolation.
- 05Expand only after the pilot demonstrates sustainable improvements in cost, reliability or delivery time without weakening controls.
Frequently asked questions
Is Kubernetes necessary for AI workloads?
No. A single-server deployment, managed inference API or managed machine-learning platform may be sufficient. Kubernetes is useful when workload diversity, scale, hardware sharing or consistent operational controls justify the additional platform complexity.
Can Kubernetes automatically share a GPU between multiple AI models?
Not by default in conventional whole-device allocation. Compatible hardware and additional device-management integrations can support sharing or partitioning. Validate memory limits, interference, security boundaries and model performance before using shared devices for production services.
What is the difference between Kubernetes and MLOps?
Kubernetes manages the infrastructure and lifecycle of containerised workloads. MLOps covers the wider machine-learning lifecycle, including experimentation, data and model versioning, evaluation, deployment, monitoring and governance. Kubernetes can support MLOps without replacing those processes.
How do I autoscale a large language model on Kubernetes?
Use metrics that reflect real inference demand, such as waiting requests or suitable runtime utilisation, together with validated replica limits, node capacity and model-readiness checks. Test realistic concurrency and model-loading time. Components such as KServe and KEDA can help integrate demand-aware scaling.
Does Kubernetes reduce GPU costs?
It can enable better resource coordination and capacity management, but savings are not automatic. Results depend on workload efficiency, sharing constraints, demand, hardware economics and operational overhead. Measure cost per successful task against the current baseline at equivalent quality and service levels.
Can training and inference run on the same Kubernetes cluster?
Yes. With appropriate resource pools, admission policies, isolation and protected serving capacity, a cluster can host both. For sensitive or latency-critical workloads, separate nodes or clusters may be preferable. Training interruptions, resource competition and recovery behaviour need explicit testing.
Is Kubernetes suitable for regulated AI environments?
It can provide a foundation for consistent access controls, workload separation, policy enforcement and operational evidence. Compliance still depends on the complete application, data processing, model governance, security architecture and applicable regulatory obligations.