Repository navigation
Under the Hood: How Michelangelo's Controller Manager Turns Job Specs into Native K8s Workloads #1601
paulzim
started this conversation in
Show and tell
Replies: 1 comment 1 reply
|
Could you share more about the full lifecycle of a job in the current FIFO queue? Specifically: how is it scoped (global vs. per-pool), and what happens when the job at the head can't fit? Does it block everything behind it, or is there backfill for smaller jobs that would fit? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
If you've been following along with the Michelangelo architecture, you know that Uniflow acts as our control plane for defining what needs to happen in an ML workflow. But once an execution plan is set, the big question becomes: where and how does it actually run? That's where the Controller Manager comes in.
It's the muscle behind the platform... a set of Kubernetes controllers (
go/cmd/controllermgr) sitting directly on top of the cluster, reconciling high-level ML job resources into the native Kubernetes and third-party operator CRDs that actually do the work, without forcing data scientists and ML engineers to become Kubernetes administrators.The Problem: The "YAML Wall" of Distributed ML
Requesting a distributed training or data-processing job shouldn't require hand-writing Kubernetes manifests, wiring up operator-specific CRDs, or reasoning about pod topology yourself. When infrastructure complexity creeps into the ML lifecycle, iteration speed tanks.
How the Controller Manager Solves This
Instead of submitting raw Kubernetes manifests, users define a
RayJob,RayCluster, orSparkJobresource through Michelangelo's API. A dedicated controller for each resource type watches it and reconciles it into the underlying CRD that actually executes:RayCluster/RayJobreconciles into KubeRay'sRayClusterCRD.SparkJobreconciles into the Spark Operator'sSparkApplicationCRD.Today, that means two natively supported execution engines:
RayCluster/RayJobresources for distributed computing.SparkJobresources, which the controller turns intoSparkApplicationCRDs via the Spark Operator for data processing and feature engineering.The controller handles a chunk of cluster management automatically today, with more sophistication planned:
nvidia.com/gpuresources and the scheduler accounts for them when placing work. SKU-aware GPU allocation is on the roadmap, not yet shipped.The Result: Less YAML, More Iteration
By handling the translation from job resource to cluster-native CRD, the Controller Manager lets infrastructure teams keep ownership of the underlying cluster while ML practitioners submit jobs without hand-writing manifests.
flowchart TB User["ML Engineer<br/>submits RayJob / SparkJob spec"] API["API Server<br/>(go/cmd/apiserver)"] CM["Controller Manager<br/>(go/cmd/controllermgr)"] subgraph CM_internal[" "] RC["Ray controllers"] SC["Spark controller"] end KubeRay["KubeRay Operator"] SparkOp["Spark Operator"] RayCR["RayCluster CRD<br/>(ray.io)"] SparkCR["SparkApplication CRD<br/>(sparkoperator.k8s.io)"] RayPods["Ray head + worker pods"] SparkPods["Spark driver + executor pods"] User --> API --> CM CM --> RC CM --> SC RC --> KubeRay --> RayCR --> RayPods SC --> SparkOp --> SparkCR --> SparkPodsWe'd Love Your Feedback!
As we continue evolving the Controller Manager, we're eager to hear how the community approaches distributed workload orchestration:
Drop your thoughts, questions, or feature requests below!
All reactions