This article is based on a piece originally published at containerjournal.com.
The Problem: Kubernetes Was Built for Production, Not for ML Experimentation
If your organization is running machine learning workloads, you have almost certainly run into a familiar tension: data science teams need enormous compute resources, and your Kubernetes cluster is right there. The temptation to hand them cluster access is real. The consequences, however, are predictable.
Kubernetes was engineered for running stable, production-grade, replicated services. ML and deep learning (DL) workloads are almost the exact opposite: they are experimental, ephemeral, highly variable in resource demand, and they change constantly. Pretending otherwise creates operational pain for everyone involved.
What Data Scientists Actually Need
Data scientists are researchers first. Their job is to develop models, tune hyperparameters, and run experiments — often hundreds or thousands of them concurrently. To do that effectively, they need:
- Remote compute with GPU access. Local laptops typically lack the memory, storage, and GPU capacity required for modern deep learning workloads.
- Fast environment iteration. Experiment code changes frequently. Keeping Dockerfiles,
requirements.txtfiles, and Conda YAML manifests up to date manually is a distraction from the actual science. - Domain-specific monitoring. They care about model accuracy, training loss curves, and experiment throughput — not CPU utilization graphs.
- Queue-based job scheduling. Running many concurrent experiments that are short-lived relative to server uptime is an HPC-style challenge, not a standard Kubernetes workload pattern.
Why Giving Data Scientists Raw Kubernetes Access Is a Bad Idea
On a well-managed Kubernetes cluster, a set of operational rules exist for good reason. Granting unrestricted access to ML teams tends to violate most of them:
- Placing all pods in a single namespace.
- Manually managing large numbers of heterogeneous pod types and repository workloads.
- Attempting to control Kubernetes scheduler ordering — which is not reliably possible.
- Leaving thousands of stale, single-use container images on the cluster.
- Triggering uncontrolled node autoscaling in response to a flood of pending experimental jobs.
Unlike traditional software deployment — where a tested, stable artifact is replicated across nodes — ML experimentation means continuously deploying unstable, in-progress code at scale. A cluster of tens of thousands of one-off container images is not a hypothetical; it is a common outcome.
Breaking Down the Real Requirements
The needs of DevOps teams and data science teams differ significantly across every dimension of infrastructure management. Understanding the gap is the first step toward bridging it.
Resource Access
For a DevOps engineer, resource access means namespaces, RBAC policies, network policies, and reliability. For a data scientist, it means: Is this a CPU machine or a GPU machine, and how many GPUs does it have? A simple tiered model — CPU, 1×GPU, 2×GPU, 8×GPU — typically covers the majority of AI team requirements. The nuance that matters to operations is largely irrelevant to the researchers.
Environment Packaging
From a DevOps perspective, environment packaging means containerizing a stable codebase. For ML teams, the development environment changes constantly. Manually maintaining Dockerfiles and dependency manifests is time-consuming and error-prone — stale configurations accumulate quickly because they are decoupled from the actual coding environment. What is needed is automatic extraction of the environment state, with seamless replication from local development machines to remote execution pods.
Monitoring
DevOps monitoring focuses on infrastructure health: CPU usage, memory pressure, disk I/O, pod restarts. Data science monitoring focuses on experiment health: training loss, validation accuracy, throughput, and custom business-relevant metrics. No universal standard exists for ML experiment monitoring, and the ability to define and track custom metrics is often what separates a productive ML team from one flying blind.
Job Scheduling
Kubernetes job scheduling is oriented around resource allocation for long-running or indefinite workloads. ML job scheduling is closer to an HPC queuing problem: there are always more experiments queued than available resources, jobs are relatively short-lived, and the scheduling policy — which job runs first, on which resources, with what priority — directly affects research velocity. Kubernetes was not designed to optimize for this pattern.
MLOps: A Purpose-Built Layer for AI Workloads
MLOps tooling has emerged specifically to address this gap. Rather than replacing Kubernetes, a well-designed MLOps platform sits on top of it — presenting a resource interface tailored to data science teams while letting Kubernetes continue to do what it does well: managing the underlying hardware cluster.
From a Kubernetes perspective, the MLOps platform is just another application: a replicated service with a known resource footprint, deployed and managed like anything else on the cluster. From the data science team’s perspective, it exposes their allocated compute nodes as a logical cluster they control directly.
What an MLOps Platform Provides
- Dedicated job queues with priority ordering, experiment tracking, and isolation from Kubernetes scheduler internals.
- Automatic environment packaging that extracts and replicates the current development environment into a container without requiring the data scientist to manually maintain Dockerfiles.
- Experiment-centric monitoring with customizable metrics dashboards suited to model development workflows.
- Lifecycle management for experiments, including the ability to terminate runaway jobs without DevOps intervention.
- Self-service provisioning so that the AI team can launch, monitor, and clean up their own workloads within the resource budget already allocated by the DevOps team.
The Resulting Division of Responsibility
With an MLOps layer in place, the operational model becomes significantly cleaner:
- DevOps team: Manages Kubernetes, allocates hardware resources to the MLOps platform, and updates resource allocations when needed. They are not in the critical path for every experiment run.
- Data science team: Self-services through the MLOps platform. They launch experiments, track results, manage their queues, and iterate on models without needing to understand Kubernetes internals or file infrastructure tickets.
The MLOps solution acts as the glue: it picks jobs from the ML team’s queues, provisions the appropriate environment (inside a container or as a sidecar), submits the workload to Kubernetes with proper resource requests, monitors execution, and handles cleanup — all without manual DevOps involvement.
Key Takeaways
- Kubernetes is the right tool for managing production infrastructure and hardware clusters. It is not the right tool for managing ML experiment workflows directly.
- Data science teams have fundamentally different requirements for resource access, environment management, monitoring, and scheduling than traditional software engineering teams.
- MLOps platforms address these requirements by providing a purpose-built interface that runs on top of Kubernetes without disrupting its operational model.
- A clean MLOps integration reduces the operational burden on DevOps teams, eliminates cluster sprawl, and gives data scientists the autonomy they need to iterate quickly.
The payoff is straightforward: fewer 2 a.m. provisioning calls, fewer stale container images clogging your registry, and a data science team that can actually focus on building models rather than filing infrastructure tickets.