llm-wiki wiki · sources 2026-06-14

原文:raw/jobset-architecture-analysis.md · 仓库:https://github.com/kubernetes-sigs/jobset · 优先级 P1

一句话定位

JobSet 是 K8s native API for distributed ML training and HPC workloads,用多个 replicated jobs 表达一个整体作业。

核心架构图

┌────────────────────────────────────────────────────────────────────────────┐
│ Distributed batch / ML job intent                                          │
│ A training or HPC workload needs multiple related Kubernetes Jobs.         │
└────────────────────────────────────────────────────────────────────────────┘
                                       │
                                       ▼
┌────────────────────────────────────────────────────────────────────────────┐
│ JobSet API                                                                 │
│ Replicated jobs, dependencies, startup ordering, success policy, and       │
│ failure behavior.                                                          │
└────────────────────────────────────────────────────────────────────────────┘
                                       │
                                       ▼
┌────────────────────────────────────────────────────────────────────────────┐
│ JobSet controller                                                          │
│ Creates child Jobs and reconciles status, completion, restart, and failure │
│ policy.                                                                    │
└────────────────────────────────────────────────────────────────────────────┘
                                       │
                                       ▼
┌────────────────────────────────────────────────────────────────────────────┐
│ Runtime boundary                                                           │
│ Kueue, scheduler, Pods, and distributed frameworks run the actual work.    │
└────────────────────────────────────────────────────────────────────────────┘

模块分层

层 / 模块 职责
API JobSet / replicatedJobs
Controller child Job lifecycle and status aggregation
Failure policy restart / recreate / fail fast
Integrations Kueue, batch, ML training

关键数据流

用户提交 JobSet
        │
        ▼
controller 展开多个 child Jobs
        │
        ▼
各 job 创建 Pods
        │
        ▼
聚合成功/失败状态
        │
        ▼
按 failure policy 处理重试或终止

设计决策与哲学