官方仅支持并测试 Kubernetes 1.34 及以上版本;gang scheduling 处于 Alpha,API 可能变化;安装需按官方安装指南操作,README 未提供一键命令
lws
kubernetes-sigsApache-2.0活跃维护Kubernetes 上的 LeaderWorkerSet API,用来编排多机多卡的分布式推理工作负载,把大模型服务拆成 leader 和 worker 组统一调度。
LeaderWorkerSet & DisaggregatedSet: Kubernetes APIs for Distributed and Disaggregated AI Serving
README 未给出具体安装命令,仅指向 https://lws.sigs.k8s.io/docs/installation/ 安装指南README 未说明具体显存或 GPU 型号要求,仅说明面向多节点多设备分片推理场景
Kubernetes 上部署多机推理负载的 API,把一组 Pod 当作一个复制单元来管理
Kubernetes 上的 LeaderWorkerSet API,用来编排多机多卡的分布式推理工作负载,把大模型服务拆成 leader 和 worker 组统一调度。
核心能力
- 把一组 Pod 当作一个 super pod 统一管理
- 每个 Pod 有 0 到 n-1 的唯一索引身份
- leader 与 worker 双模板,可分别指定
- 支持组级滚动更新与 HPA 扩缩容
- 可选 gang scheduling 与拓扑感知放置
容易踩的坑
- v1.0.0最新正式版2026-10-16 · 2026-10-16 14:26 UTC
Highlights
v1.0.0 improves rollout coordination and scaling for DisaggregatedSet, adds independently scalable sub-roles, and strengthens scheduling and recovery.
-
Fractional rollout window: Roles advance in proportion to their replica counts, allowing new batches to start before earlier ones are fully Ready and making fuller use of the configured
maxSurgeandmaxUnavailablebudgets without letting one role progress too far ahead. PR: #907. -
Scaling during rollouts: Scale-up continues during rolling updates, while opt-in scale-down lets operators or autoscalers safely reduce capacity before the update finishes. KEP-1022; PR: #1166.
-
Independently scalable sub-roles: DisaggregatedSet can partition a role into separate scaling and routing pools that share the same workload configuration, with support for both
OrdinalandHashgroup identity. KEP-960; PRs: #964, #1173. -
Native gang scheduling reliability: Fix PodGroup lifecycle and group-size update handling so group recreation and size-changing rollouts do not leave workloads stuck. The native integration remains alpha and opt-in. KEP-666; PRs: #1132, #1133, #1135.
-
Bounded group recovery: Set
maxGroupRestartsto cap automatic recreations of each replica group andrestartBackoffto limit repeated recreation frequency. Both supportOrdinalandHashgroup identity. KEP-820; PRs: #877, #1093, #1103. -
Parallel Pod termination: Set
podTerminationPolicy: Parallelto terminate leaders and workers concurrently during group rebuilds, rollouts, scale-down, and deletion.Sequentialremains the default. KEP-956; PR: #1104. -
Stable configuration API: Controller configuration graduates to
config.lws.x-k8s.io/v1, whilev1alpha1remains supported but deprecated. PR: #1094.
Urgent Upgrade Notes
(No, really, you MUST read this before you upgrade)
- DisaggregatedSet roles without a rollingUpdateConfiguration now roll out with maxSurge 0 and maxUnavailable 1, like LeaderWorkerSet, instead of maxSurge 1 and maxUnavailable 0. The CRDs now default rolloutStrategy and rollingUpdateConfiguration, so these values appear on the object. Set maxSurge 1 and maxUnavailable 0 on a role to keep bringing the new revision up before the old one drains. (#1169, @BenjaminBraunDev)
- New DisaggregatedSets use a more robust revision hash that detects changes to startup policy, network configuration, labels and annotations, without triggering rollouts merely because roles are reordered. Existing DisaggregatedSets retain the previous hashing mechanism to avoid upgrade-triggered rollouts. The legacy hashing mechanism remains supported in this release, but is planned for deprecation in a future version that has not yet been specified. (#1100, @hasB4K)
- V1.0.0 removes support for slice-less LeaderWorkerSets generated for DisaggregatedSets originally created with v0.9.x. If an affected DisaggregatedSet has not rolled out under v0.10.x or v0.11.x, install either version and complete one template rollout before upgrading to v1.0.0. (#1085, @hasB4K)
Changes by Kind
API Change
- DisaggregatedSet roles can define independently scalable Ordinal subroles sharing one LeaderWorkerSet. Each subrole has its own rollout budget, Pod routing labels, scaler, and status nested under its parent. Single-role DisaggregatedSets are also supported. (#964, @hasB4K)
- DisaggregatedSet status now reports
desiredReplicasfor each role and sub-role, in
-
- v0.11.12026-10-01 · 2026-10-01 19:06 UTC
查看更新说明
[release-0.11] Name hash worker StatefulSets after the leader host name by @BenjaminBraunDev in https://github.com/kubernetes-sigs/lws/pull/1112
- v0.11.02026-09-23 · 2026-09-23 19:54 UTC
查看更新说明
What's Changed
- Populate DisaggregatedSet .status from owned LWS objects by @BenAyedMedAla in https://github.com/kubernetes-sigs/lws/pull/933
- Fixed hardcoded namespace for upgrade test by @YamunadeviShanmugam in https://github.com/kubernetes-sigs/lws/pull/978
- chore(deps): bump github.com/onsi/ginkgo/v2 from 2.32.0 to 2.32.1 by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/985
- Drop unneeded client cert from metrics ServiceMonitor tlsConfig by @anneheartrecord in https://github.com/kubernetes-sigs/lws/pull/976
- chore(deps-dev): bump postcss from 8.5.25 to 8.5.26 in /site in the all group by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/984
- Validate generated LWS/Service name lengths at DisaggregatedSet admission by @Dasmat13 in https://github.com/kubernetes-sigs/lws/pull/966
- fix: skip creating SubdomainUniquePerReplica headless service for deleting leader pod by @Dasmat13 in https://github.com/kubernetes-sigs/lws/pull/947
- Rebuild worker StatefulSet entirely from the leader's revision by @tomsen02 in https://github.com/kubernetes-sigs/lws/pull/963
- fix: preserve missing-node reconcile errors by @ShiroKSH in https://github.com/kubernetes-sigs/lws/pull/946
- Verify controller ownership before GetForRole/Scale/legacy-slice0 mutate an LWS by @BenAyedMedAla in https://github.com/kubernetes-sigs/lws/pull/983
- Add Available/Progressing conditions to DisaggregatedSet status by @BenAyedMedAla in https://github.com/kubernetes-sigs/lws/pull/980
- chore(deps): bump github.com/stretchr/testify from 1.11.1 to 1.12.1 by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/1001
- Fix DisaggregatedSet StatefulSet name validation budget (#972) by @Dasmat13 in https://github.com/kubernetes-sigs/lws/pull/991
- Add leader/worker role label to managed StatefulSets by @yindia in https://github.com/kubernetes-sigs/lws/pull/1002
- [docs] restructure documentation for LeaderWorkerSet and DisaggregatedSet concepts and overview by @ahg-g in https://github.com/kubernetes-sigs/lws/pull/989
- Emit linkTitle and weight from the genref template by @BenjaminBraunDev in https://github.com/kubernetes-sigs/lws/pull/1005
- Add serviceMonitor.extraLabels to values and extend serviceMonitor template to use them by @k-caps in https://github.com/kubernetes-sigs/lws/pull/977
- [docs] Add hash group identity KEP by @BenjaminBraunDev in https://github.com/kubernetes-sigs/lws/pull/986
- Remove unnecessary pods create permission from controller RBAC by @aliceco01 in https://github.com/kubernetes-sigs/lws/pull/997
- Keep role label on StatefulSet metadata, not pod templates by @yindia in https://github.com/kubernetes-sigs/lws/pull/1017
- chore(deps): bump the kubernetes group with 8 updates by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/1013
- chore(deps): bump google.golang.org/grpc from 1.82.1 to 1.83.1 by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/1019
- [feat] Add groupIdentity Hash mode with Deployment managed leaders by @BenjaminBraunDev in https://github.com/kubernetes-sigs/lws/pull/987
- fix: keep kind_load_image archive cleanup in a subshell by @AshSgDe29071999 in https://github.com/kubernetes-sigs/lws/pull/993
- Add Helm-based upgrade E2E test by @yindia in https://github.com/kubernetes-sigs/lws/pull/1003
- Fix RecreateGroupOnPodRestart deletion race by @poorpaper in https://github.com/kubernetes-sigs/lws/pull/999
- Extend Helm manifest synchronization beyond CRDs by @Dasmat13 in https://github.com/kubernetes-sigs/lws/pull/953
- fix(test): prevent scaler race in DisaggregatedSet HPA e2e tests by @ahg-g in https://github.com/kubernetes-sigs/lws/pull/1026
- Use LWS ownership for DisaggregatedSet Services by @ErikJiang in https://github.com/kubernetes-sigs/lws/pull/1004
- fix: prevent nil pointer panics in webhook and controller by @Dasmat13 in https://github.com/kubernetes-sigs/lws/pull/932
- chore(deps): bump github.com/onsi/gomega
- v0.10.02026-08-11 · 2026-08-11 19:59 UTC
查看更新说明
What's Changed
- Add hasB4K to OWNERS reviewers by @hasB4K in https://github.com/kubernetes-sigs/lws/pull/888
- chore: bump golang.org/x/net and x/sys to fix Trivy CI findings by @ErikJiang in https://github.com/kubernetes-sigs/lws/pull/900
- cleanup: remove unused DisaggregatedSet dead code by @ErikJiang in https://github.com/kubernetes-sigs/lws/pull/899
- chore(deps): bump github.com/onsi/ginkgo/v2 from 2.30.0 to 2.32.0 by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/905
- [docs] Add DisaggregatedSet slices KEP by @BenjaminBraunDev in https://github.com/kubernetes-sigs/lws/pull/879
- docs: add DisaggregatedSet documentation by @Dasmat13 in https://github.com/kubernetes-sigs/lws/pull/811
- docs: fix DisaggregatedSet nits from #811 review by @Dasmat13 in https://github.com/kubernetes-sigs/lws/pull/911
- webhook: reject LeaderWorkerSet replicas outside [0, 1000000] range by @Dasmat13 in https://github.com/kubernetes-sigs/lws/pull/913
- Planner rolling updates doc clarification by @BenjaminBraunDev in https://github.com/kubernetes-sigs/lws/pull/863
- Helm: fix Prometheus ServiceMonitor for 'enablePrometheus: true' by @EladDolev in https://github.com/kubernetes-sigs/lws/pull/903
- docs: add DisaggregatedSet API reference by @yankay in https://github.com/kubernetes-sigs/lws/pull/878
- chore(deps): bump github.com/onsi/gomega from 1.41.0 to 1.42.1 by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/904
- Add slices field to DisaggregatedSet by @BenjaminBraunDev in https://github.com/kubernetes-sigs/lws/pull/873
- Fix cert-manager CA injection for Helm webhooks by @1cbyc in https://github.com/kubernetes-sigs/lws/pull/909
- chore(deps-dev): bump the all group in /site with 2 updates by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/915
- KEP-849: Per-role HPA support for DisaggregatedSet by @hasB4K in https://github.com/kubernetes-sigs/lws/pull/910
- chore(deps): bump sigs.k8s.io/structured-merge-diff/v6 from 6.4.0 to 6.4.2 in the kubernetes group by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/924
- chore: Remove GoReportCard badge by @tenzen-y in https://github.com/kubernetes-sigs/lws/pull/923
- Bump golang.org/x/text to v0.39.0 to fix CVE-2026-56852 by @BenjaminBraunDev in https://github.com/kubernetes-sigs/lws/pull/929
- Propagate LWS metadata to StatefulSets by @mj006648 in https://github.com/kubernetes-sigs/lws/pull/896
- webhook: reject maxSurge=0+maxUnavailable=0 in DisaggregatedSet by @Dasmat13 in https://github.com/kubernetes-sigs/lws/pull/912
- [docs] Add DisaggregatedSet placement policy KEP by @BenjaminBraunDev in https://github.com/kubernetes-sigs/lws/pull/906
- [feat] Add placement policy field and support to DisaggregatedSet by @BenjaminBraunDev in https://github.com/kubernetes-sigs/lws/pull/916
- Add manifests upgrade E2E coverage by @yankay in https://github.com/kubernetes-sigs/lws/pull/928
- docs: document safe Helm upgrade path for CRDs by @anneheartrecord in https://github.com/kubernetes-sigs/lws/pull/883
- chore: unblock CI (verify CHART_VERSION, bump grpc past CVE) by @hasB4K in https://github.com/kubernetes-sigs/lws/pull/937
- Fix SubGroupIndex assignment and TPU variables injection when SubGrou… by @YuleiF in https://github.com/kubernetes-sigs/lws/pull/918
- chore(deps): bump github.com/google/cel-go from 0.26.0 to 0.29.0 by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/940
- feat(disaggregatedset): per-role autoscaling via DisaggregatedSetRoleScaler by @hasB4K in https://github.com/kubernetes-sigs/lws/pull/922
- chore(deps): bump the kubernetes group across 1 directory with 8 updates by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/939
- chore(deps-dev): bump postcss from 8.5.16 to 8.5.24 in /site by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/944
- [docs] DisaggregatedSet operations and slice features by @BenjaminBraunDev in https://github.com/kuber
- v0.9.02026-06-17 · 2026-06-17 20:44 UTC
查看更新说明
What's Changed
- chore(deps): upgrade Kubernetes dependencies to v0.35.0 and migrate to generic webhook APIs by @yankay in https://github.com/kubernetes-sigs/lws/pull/741
- chore(deps): bump sigs.k8s.io/structured-merge-diff/v6 from 6.3.1 to 6.3.2 by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/753
- chore(deps-dev): bump autoprefixer from 10.4.23 to 10.4.24 in /site in the all group by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/750
- [Documentation] Add HPA example to LWS site by @LuyuZhang00 in https://github.com/kubernetes-sigs/lws/pull/663
- Ignore VSCode workspace files by @adinilfeld in https://github.com/kubernetes-sigs/lws/pull/755
- Support TPU environment variables for multi-container pods by @adinilfeld in https://github.com/kubernetes-sigs/lws/pull/754
- chore(deps): bump github.com/onsi/ginkgo/v2 from 2.27.5 to 2.28.1 by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/747
- chore(deps): bump the kubernetes group with 8 updates by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/758
- chore(deps): bump sigs.k8s.io/controller-runtime from 0.23.0 to 0.23.1 by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/748
- chore(deps): bump github.com/onsi/gomega from 1.39.0 to 1.39.1 by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/749
- TAS user guide: updating kueue version to 0.16.1 by @Edwinhr716 in https://github.com/kubernetes-sigs/lws/pull/759
- Graduate RecreateGroupAfterStart to an API by @adinilfeld in https://github.com/kubernetes-sigs/lws/pull/757
- Migrate to new events API by @adinilfeld in https://github.com/kubernetes-sigs/lws/pull/761
- Fix odd number of arguments in log call for pending pod skip by @johnnietse in https://github.com/kubernetes-sigs/lws/pull/763
- chore: Adding KAL (Kube API Linter) by @ganimtron-10 in https://github.com/kubernetes-sigs/lws/pull/760
- chore(deps): bump go.opentelemetry.io/otel/sdk from 1.36.0 to 1.40.0 by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/771
- chore(deps): bump the kubernetes group with 8 updates by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/764
- chore(deps-dev): bump the all group across 1 directory with 2 updates by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/775
- chore(deps): bump sigs.k8s.io/controller-runtime from 0.23.1 to 0.23.3 by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/774
- chore(deps): bump github.com/open-policy-agent/cert-controller from 0.15.0 to 0.16.0 by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/780
- chore(deps): bump google.golang.org/grpc from 1.72.2 to 1.79.3 by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/782
- Fix LWS surge handling during scale-up and zero-unavailable updates by @ZRJ026 in https://github.com/kubernetes-sigs/lws/pull/778
- security: Update trivy-action to use sha for v0.35.0 by @Priyankasaggu11929 in https://github.com/kubernetes-sigs/lws/pull/785
- Remove redundant watch of leader pod + increase e2e test timeout by @adinilfeld in https://github.com/kubernetes-sigs/lws/pull/791
- [bugfix] fix StatefulsetReady check by @LuyuZhang00 in https://github.com/kubernetes-sigs/lws/pull/705
- Update maxUnavailable calculation for leader StatefulSet by @adinilfeld in https://github.com/kubernetes-sigs/lws/pull/781
- Manually bump dependencies from 0.35.2 to 0.35.3 by @adinilfeld in https://github.com/kubernetes-sigs/lws/pull/793
- chore(deps): bump picomatch in /site by @dependabot[bot] in https://github.com/kubernetes-sigs/lws/pull/794
- KEP-766: DisaggregatedSet implementation by @hasB4K in https://github.com/kubernetes-sigs/lws/pull/773
- KEP-766: Add DisaggregatedSet proposal by @hasB4K in https://github.com/kubernetes-sigs/lws/pull/767
- chore(deps): bump go.opentelemetry.io/otel/sdk from 1.36.0 to 1.40.0 in /disaggregatedset by @dependabot[bot] in https://github.com/kuber
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
The LeaderWorkerSet and DisaggregatedSet APIs
LeaderWorkerSet (LWS): An API for deploying a group of pods as a unit of replication. It aims to address common deployment patterns of AI/ML inference workloads, especially multi-host inference workloads where the LLM will be sharded and run across multiple devices on multiple nodes.
DisaggregatedSet (DS): An API to support advanced multi-node inference. LWS forms the core API for multi-node while DisaggregatedSet builds on it to add advanced disaggregated workload deployment with support for autoscaling, rollouts and failure handling.
Both APIs are being co-designed with (CNCF sandbox project). llm-d is a high-performance distributed inference serving stack optimized for production deployments. This collaboration ensures that the APIs are optimized for real-world serving frameworks and disaggregated architectures, helping achieve state-of-the-art performance across hardware accelerators.
Read the documentation or watch the related talks & presentations to learn more.
Feature overview
Core Features: LeaderWorkerSet
- Group of Pods as a unit: Supports a tightly managed group of pods that represent a “super pod”
- Unique pod identity: Each pod in the group has a unique index from 0 to n-1.
- Parallel creation: Pods in the group will have the same lifecycle and be created in parallel.
- Gang Scheduling: Each replica with a group of pods can be scheduled in an all-or-nothing manner (Alpha level, API may change in the future).
- Dual-template, one for leader and one for the workers: A replica is a group of a single leader and a set of workers, and allow to specify a template for the workers and optionally use a second one for the leader pod.
- Multiple groups with identical specifications: Supports creating multiple “replicas” of the above mentioned group. Each group is a single unit for rolling update, scaling, and maps to a single exclusive topology for placement.
- A scale subresource: A scale endpoint is exposed for HPA to dynamically scale the number replicas (aka number of groups)
- Rollout and Rolling update: Supports performing rollout and rolling update at the group level, which means the groups are upgraded one by one as a unit (i.e. the pods within a group are updated together).
- Topology-aware placement: Opt-in support for pods in the same group to be co-located in the same topology.
- All-or-nothing restart for failure handling: Opt-in support for all pods in the group to be recreated if one pod in the group failed or one container in the pods is restarted.
Advanced Features: DisaggregatedSet
- Disaggregated Architecture Support: Specifically designed for workloads where different phases (e.g., prefill and decode) run on separate infrastructure.
- Coordinated N-Dimensional Rollouts: Updates multiple roles (2-10) in lockstep, preserving capacity ratios throughout the update process.
- Unified Lifecycle Management: Manages multiple underlying LeaderWorkerSets as a single logical unit.
- Automatic Service Orchestration: Automatically creates and manages headless services for each role to facilitate discovery and revision-aware routing.
- Advanced Failure Handling: Coordinated drain and restart policies across all roles in the disaggregated set.
Compatibility
LeaderWorkerSet maintains support for the latest Kubernetes minor versions (currently tested on Kubernetes 1.34 through 1.37).
Test Coverage
Installation
Officially supported and tested on Kubernetes 1.34 or newer.
Read the installation guide to learn more.
Examples
Read the examples to learn more.
Also discover adopters, integrations, and talks here.
Community, discussion, contribution, and support
Learn how to engage with the Kubernetes community on the community page.
You can reach the maintainers of this project at:
Code of conduct
Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.