llm-wiki wiki · sources 2026-06-14

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

一句话定位

scheduler-plugins 是基于 kube-scheduler framework 的 out-of-tree 插件集合,用于研究和生产化调度扩展。

核心架构图

┌────────────────────────────────────────────────────────────────────────────┐
│ Scheduling policy gap                                                      │
│ A platform needs behavior beyond the default kube-scheduler policies.      │
└────────────────────────────────────────────────────────────────────────────┘
                                       │
                                       ▼
┌────────────────────────────────────────────────────────────────────────────┐
│ Scheduler framework extension                                              │
│ Out-of-tree plugins implement filter, score, reserve, permit, bind, or     │
│ related hooks.                                                             │
└────────────────────────────────────────────────────────────────────────────┘
                                       │
                                       ▼
┌────────────────────────────────────────────────────────────────────────────┐
│ Supporting components                                                      │
│ Controllers, manifests, scheduler profiles, and integration tests provide  │
│ operational context.                                                       │
└────────────────────────────────────────────────────────────────────────────┘
                                       │
                                       ▼
┌────────────────────────────────────────────────────────────────────────────┐
│ Runtime boundary                                                           │
│ Pods and Nodes are scheduled through Kubernetes scheduler profiles using   │
│ the plugins.                                                               │
└────────────────────────────────────────────────────────────────────────────┘

模块分层

层 / 模块 职责
Framework plugins queueSort/preFilter/filter/score/reserve 等扩展点
Scheduler binary/config Scheduler binary/config
Controllers/examples for capacity/placement policies Controllers/examples for capacity/placement policies
Integration tests and manifests Integration tests and manifests

关键数据流

Pod 进入 scheduler queue
        │
        ▼
插件在各 extension point 参与决策
        │
        ▼
score/filter/reserve 改变节点选择
        │
        ▼
scheduler bind Pod
        │
        ▼
控制器/指标反馈策略效果

设计决策与哲学