Skip to content

Commit 9b64dcd

Browse files
authored
Merge pull request #44856 from my-git9/patch-3802
[zh-cn] sync scheduling-framework networkpolicy.yaml
2 parents 441de34 + 19c6084 commit 9b64dcd

File tree

2 files changed

+49
-52
lines changed

2 files changed

+49
-52
lines changed

content/zh-cn/docs/concepts/scheduling-eviction/_index.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ title: 调度、抢占和驱逐
33
weight: 95
44
content_type: concept
55
description: >
6-
在 Kubernetes 中,调度 (scheduling) 指的是确保 Pod 匹配到合适的节点,
7-
以便 kubelet 能够运行它们。抢占 (Preemption) 指的是终止低优先级的 Pod 以便高优先级的 Pod
8-
可以调度运行的过程。驱逐 (Eviction) 是在资源匮乏的节点上,主动让一个或多个 Pod 失效的过程。
6+
在 Kubernetes 中,调度scheduling指的是确保 Pod 匹配到合适的节点,
7+
以便 kubelet 能够运行它们。抢占Preemption指的是终止低优先级的 Pod 以便高优先级的 Pod
8+
可以调度运行的过程。驱逐Eviction是在资源匮乏的节点上,主动让一个或多个 Pod 失效的过程。
99
no_list: true
1010
---
1111

@@ -30,12 +30,12 @@ is the process of terminating Pods with lower {{<glossary_tooltip text="Priority
3030
so that Pods with higher Priority can schedule on Nodes. Eviction is the process
3131
of terminating one or more Pods on Nodes.
3232
-->
33-
在 Kubernetes 中,调度 (scheduling) 指的是确保 {{<glossary_tooltip text="Pod" term_id="pod">}}
33+
在 Kubernetes 中,调度scheduling指的是确保 {{<glossary_tooltip text="Pod" term_id="pod">}}
3434
匹配到合适的{{<glossary_tooltip text="节点" term_id="node">}},
3535
以便 {{<glossary_tooltip text="kubelet" term_id="kubelet">}} 能够运行它们。
36-
抢占 (Preemption) 指的是终止低{{<glossary_tooltip text="优先级" term_id="pod-priority">}}的 Pod
37-
以便高优先级的 Pod 可以调度运行的过程。
38-
驱逐 (Eviction) 是在资源匮乏的节点上,主动让一个或多个 Pod 失效的过程。
36+
抢占Preemption指的是终止低{{<glossary_tooltip text="优先级" term_id="pod-priority">}}的
37+
Pod 以便高优先级的 Pod 可以调度运行的过程。
38+
驱逐Eviction是在资源匮乏的节点上,主动让一个或多个 Pod 失效的过程。
3939

4040
<!--
4141
## Scheduling
@@ -52,7 +52,6 @@ of terminating one or more Pods on Nodes.
5252
* [Pod Scheduling Readiness](/docs/concepts/scheduling-eviction/pod-scheduling-readiness/)
5353
* [Descheduler](https://github.com/kubernetes-sigs/descheduler#descheduler-for-kubernetes)
5454
-->
55-
5655
## 调度
5756

5857
* [Kubernetes 调度器](/zh-cn/docs/concepts/scheduling-eviction/kube-scheduler/)
@@ -74,7 +73,6 @@ of terminating one or more Pods on Nodes.
7473
* [Node-pressure Eviction](/docs/concepts/scheduling-eviction/node-pressure-eviction/)
7574
* [API-initiated Eviction](/docs/concepts/scheduling-eviction/api-eviction/)
7675
-->
77-
7876
## Pod 干扰
7977

8078
{{<glossary_definition term_id="pod-disruption" length="all">}}

content/zh-cn/docs/concepts/scheduling-eviction/scheduling-framework.md

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ weight: 60
1616
{{< feature-state for_k8s_version="v1.19" state="stable" >}}
1717

1818
<!--
19-
The scheduling framework is a pluggable architecture for the Kubernetes scheduler.
20-
It adds a new set of "plugin" APIs to the existing scheduler. Plugins are compiled into the scheduler. The APIs allow most scheduling features to be implemented as plugins, while keeping the
21-
scheduling "core" lightweight and maintainable. Refer to the [design proposal of the
22-
scheduling framework][kep] for more technical information on the design of the
23-
framework.
24-
-->
25-
调度框架是面向 Kubernetes 调度器的一种插件架构,
26-
它为现有的调度器添加了一组新的“插件” API。插件会被编译到调度器之中。
19+
The _scheduling framework_ is a pluggable architecture for the Kubernetes scheduler.
20+
It consists of a set of "plugin" APIs that are compiled directly into the scheduler.
21+
These APIs allow most scheduling features to be implemented as plugins,
22+
while keeping the scheduling "core" lightweight and maintainable. Refer to the
23+
[design proposal of the scheduling framework][kep] for more technical information on
24+
the design of the framework.
25+
-->
26+
**调度框架**是面向 Kubernetes 调度器的一种插件架构,
27+
它由一组直接编译到调度程序中的“插件” API 组成。
2728
这些 API 允许大多数调度功能以插件的形式实现,同时使调度“核心”保持简单且可维护。
2829
请参考[调度框架的设计提案](https://github.com/kubernetes/enhancements/blob/master/keps/sig-scheduling/624-scheduling-framework/README.md)
2930
获取框架设计的更多技术信息。
@@ -33,9 +34,9 @@ framework.
3334
<!-- body -->
3435

3536
<!--
36-
# Framework workflow
37+
## Framework workflow
3738
-->
38-
# 框架工作流程 {#framework-workflow}
39+
## 框架工作流程 {#framework-workflow}
3940

4041
<!--
4142
The Scheduling Framework defines a few extension points. Scheduler plugins
@@ -46,15 +47,15 @@ can change the scheduling decisions and some are informational only.
4647
这些插件中的一些可以改变调度决策,而另一些仅用于提供信息。
4748

4849
<!--
49-
Each attempt to schedule one Pod is split into two phases, the **scheduling
50-
cycle** and the **binding cycle**.
50+
Each attempt to schedule one Pod is split into two phases, the
51+
**scheduling cycle** and the **binding cycle**.
5152
-->
52-
每次调度一个 Pod 的尝试都分为两个阶段,即 **调度周期****绑定周期**
53+
每次调度一个 Pod 的尝试都分为两个阶段,即**调度周期****绑定周期**
5354

5455
<!--
55-
## Scheduling Cycle & Binding Cycle
56+
### Scheduling Cycle & Binding Cycle
5657
-->
57-
## 调度周期和绑定周期 {#scheduling-cycle-and-binding-cycle}
58+
### 调度周期和绑定周期 {#scheduling-cycle-and-binding-cycle}
5859

5960
<!--
6061
The scheduling cycle selects a node for the Pod, and the binding cycle applies
@@ -95,7 +96,7 @@ stateful tasks.
9596
一个插件可能实现多个接口,以执行更为复杂或有状态的任务。
9697

9798
<!--
98-
Some interfaces match the scheduler extension points which can be configured through
99+
Some interfaces match the scheduler extension points which can be configured through
99100
[Scheduler Configuration](/docs/reference/scheduling/config/#extension-points).
100101
-->
101102
某些接口与可以通过[调度器配置](/zh-cn/docs/reference/scheduling/config/#extension-points)来设置的调度器扩展点匹配。
@@ -131,21 +132,21 @@ For more details about how internal scheduler queues work, read
131132
### EnqueueExtension
132133

133134
<!--
134-
EnqueueExtension is the interface where the plugin can control
135+
EnqueueExtension is the interface where the plugin can control
135136
whether to retry scheduling of Pods rejected by this plugin, based on changes in the cluster.
136137
Plugins that implement PreEnqueue, PreFilter, Filter, Reserve or Permit should implement this interface.
137138
-->
138-
EnqueueExtension 作为一个接口,插件可以在此接口之上根据集群中的变化来控制是否重新尝试调度被此插件拒绝的 Pod。
139-
实现 PreEnqueue、PreFilter、Filter、Reserve 或 Permit 的插件应实现此接口。
139+
EnqueueExtension 作为一个接口,插件可以在此接口之上根据集群中的变化来控制是否重新尝试调度被此插件拒绝的
140+
Pod。实现 PreEnqueue、PreFilter、Filter、Reserve 或 Permit 的插件应实现此接口。
140141

141-
#### QueueingHint
142+
### QueueingHint
142143

143144
{{< feature-state for_k8s_version="v1.28" state="beta" >}}
144145

145146
<!--
146-
QueueingHint is a callback function for deciding whether a Pod can be requeued to the active queue or backoff queue.
147+
QueueingHint is a callback function for deciding whether a Pod can be requeued to the active queue or backoff queue.
147148
It's executed every time a certain kind of event or change happens in the cluster.
148-
When the QueueingHint finds that the event might make the Pod schedulable,
149+
When the QueueingHint finds that the event might make the Pod schedulable,
149150
the Pod is put into the active queue or the backoff queue
150151
so that the scheduler will retry the scheduling of the Pod.
151152
-->
@@ -228,7 +229,7 @@ will not be called. A typical PostFilter implementation is preemption, which
228229
tries to make the pod schedulable by preempting other Pods.
229230
-->
230231
这些插件在 Filter 阶段后调用,但仅在该 Pod 没有可行的节点时调用。
231-
插件按其配置的顺序调用。如果任何 PostFilter 插件标记节点为Schedulable
232+
插件按其配置的顺序调用。如果任何 PostFilter 插件标记节点为 "Schedulable"
232233
则其余的插件不会调用。典型的 PostFilter 实现是抢占,试图通过抢占其他 Pod
233234
的资源使该 Pod 可以调度。
234235

@@ -242,7 +243,7 @@ These plugins are used to perform "pre-scoring" work, which generates a sharable
242243
state for Score plugins to use. If a PreScore plugin returns an error, the
243244
scheduling cycle is aborted.
244245
-->
245-
这些插件用于执行 “前置评分(pre-scoring)” 工作,即生成一个可共享状态供 Score 插件使用。
246+
这些插件用于执行“前置评分(pre-scoring)”工作,即生成一个可共享状态供 Score 插件使用。
246247
如果 PreScore 插件返回错误,则调度周期将终止。
247248

248249
<!--
@@ -274,8 +275,8 @@ called with the [Score](#scoring) results from the same plugin. This is called
274275
once per plugin per scheduling cycle.
275276
-->
276277
这些插件用于在调度器计算 Node 排名之前修改分数。
277-
在此扩展点注册的插件被调用时会使用同一插件的 [Score](#scoring) 结果。
278-
每个插件在每个调度周期调用一次。
278+
在此扩展点注册的插件被调用时会使用同一插件的 [Score](#scoring)
279+
结果。每个插件在每个调度周期调用一次。
279280

280281
<!--
281282
For example, suppose a plugin `BlinkingLightScorer` ranks Nodes based on how
@@ -334,7 +335,7 @@ on a node are being reserved and unreserved for a given Pod.
334335
-->
335336
实现了 Reserve 接口的插件,拥有两个方法,即 `Reserve``Unreserve`
336337
他们分别支持两个名为 Reserve 和 Unreserve 的信息传递性质的调度阶段。
337-
维护运行时状态的插件(又称 "有状态插件")应该使用这两个阶段,
338+
维护运行时状态的插件(又称"有状态插件")应该使用这两个阶段,
338339
以便在节点上的资源被保留和解除保留给特定的 Pod 时,得到调度器的通知。
339340

340341
<!--
@@ -378,8 +379,8 @@ state, it will either trigger [Unreserve](#unreserve) plugins (on failure) or
378379
[PostBind](#post-bind) plugins (on success) at the end of the binding cycle.
379380
-->
380381
这个是调度周期的最后一步。
381-
一旦 Pod 处于保留状态,它将在绑定周期结束时触发 [Unreserve](#unreserve) 插件
382-
(失败时)或 [PostBind](#post-bind) 插件(成功时)。
382+
一旦 Pod 处于保留状态,它将在绑定周期结束时触发 [Unreserve](#unreserve) 插件(失败时)或
383+
[PostBind](#post-bind) 插件(成功时)。
383384

384385
<!--
385386
### Permit
@@ -391,7 +392,7 @@ _Permit_ plugins are invoked at the end of the scheduling cycle for each Pod, to
391392
prevent or delay the binding to the candidate node. A permit plugin can do one of
392393
the three things:
393394
-->
394-
_Permit_ 插件在每个 Pod 调度周期的最后调用,用于防止或延迟 Pod 的绑定。
395+
**Permit** 插件在每个 Pod 调度周期的最后调用,用于防止或延迟 Pod 的绑定。
395396
一个允许插件可以做以下三件事之一:
396397

397398
<!--
@@ -418,22 +419,22 @@ _Permit_ 插件在每个 Pod 调度周期的最后调用,用于防止或延迟
418419
and the Pod is returned to the scheduling queue, triggering the
419420
Unreserve phase in [Reserve plugins](#reserve).
420421
-->
421-
3. **等待**(带有超时)\
422-
如果一个 Permit 插件返回 “等待” 结果,则 Pod 将保持在一个内部的 “等待中”
422+
3. **等待**(带有超时)\
423+
如果一个 Permit 插件返回“等待”结果,则 Pod 将保持在一个内部的“等待中”
423424
的 Pod 列表,同时该 Pod 的绑定周期启动时即直接阻塞直到得到批准。
424-
如果超时发生,**等待** 变成 **拒绝**,并且 Pod
425-
将返回调度队列,从而触发 [Reserve 插件](#reserve)中的 Unreserve 阶段。
425+
如果超时发生,**等待**变成**拒绝**,并且 Pod 将返回调度队列,从而触发
426+
[Reserve 插件](#reserve)中的 Unreserve 阶段。
426427

427428
{{< note >}}
428429
<!--
429430
While any plugin can access the list of "waiting" Pods and approve them
430-
(see [`FrameworkHandle`](https://git.k8s.io/enhancements/keps/sig-scheduling/624-scheduling-framework#frameworkhandle)), we expect only the permit
431-
plugins to approve binding of reserved Pods that are in "waiting" state. Once a Pod
432-
is approved, it is sent to the [PreBind](#pre-bind) phase.
431+
(see [`FrameworkHandle`](https://git.k8s.io/enhancements/keps/sig-scheduling/624-scheduling-framework#frameworkhandle)),
432+
we expect only the permit plugins to approve binding of reserved Pods that are in "waiting" state.
433+
Once a Pod is approved, it is sent to the [PreBind](#pre-bind) phase.
433434
-->
434-
尽管任何插件可以访问 “等待中” 状态的 Pod 列表并批准它们
435-
(查看 [`FrameworkHandle`](https://git.k8s.io/enhancements/keps/sig-scheduling/624-scheduling-framework#frameworkhandle))
436-
我们期望只有允许插件可以批准处于 “等待中” 状态的预留 Pod 的绑定。
435+
尽管任何插件可以访问“等待中”状态的 Pod 列表并批准它们
436+
查看 [`FrameworkHandle`](https://git.k8s.io/enhancements/keps/sig-scheduling/624-scheduling-framework#frameworkhandle)
437+
我们期望只有允许插件可以批准处于“等待中”状态的预留 Pod 的绑定。
437438
一旦 Pod 被批准了,它将发送到 [PreBind](#pre-bind) 阶段。
438439
{{< /note >}}
439440

@@ -486,7 +487,6 @@ to clean up associated resources.
486487
这是个信息传递性质的接口。
487488
PostBind 插件在 Pod 成功绑定后被调用。这是绑定周期的结尾,可用于清理相关的资源。
488489

489-
490490
<!--
491491
## Plugin API
492492
-->
@@ -531,8 +531,7 @@ enabled by default.
531531
-->
532532
你可以在调度器配置中启用或禁用插件。
533533
如果你在使用 Kubernetes v1.18 或更高版本,
534-
大部分调度[插件](/zh-cn/docs/reference/scheduling/config/#scheduling-plugins)
535-
都在使用中且默认启用。
534+
大部分调度[插件](/zh-cn/docs/reference/scheduling/config/#scheduling-plugins)都在使用中且默认启用。
536535

537536
<!--
538537
In addition to default plugins, you can also implement your own scheduling

0 commit comments

Comments
 (0)