Add eviction policy page

This is a sync to English site change (#23478)
This commit is contained in:
Qiming Teng 2020-09-08 08:50:48 +08:00
parent 942fca9b29
commit c24b2a12bc
5 changed files with 52 additions and 28 deletions

View File

@ -0,0 +1,44 @@
---
title: 驱逐策略
content_template: templates/concept
weight: 60
---
<!--
title: Eviction Policy
content_template: templates/concept
weight: 60
-->
<!-- overview -->
<!--
This page is an overview of Kubernetes' policy for eviction.
-->
本页提供 Kubernetes 驱逐策略的概览。
<!-- body -->
<!--
## Eviction Policy
The {{< glossary_tooltip text="Kubelet" term_id="kubelet" >}} can proactively monitor for and prevent total starvation of a
compute resource. In those cases, the `kubelet` can reclaim the starved
resource by proactively failing one or more Pods. When the `kubelet` fails
a Pod, it terminates all of its containers and transitions its `PodPhase` to `Failed`.
If the evicted Pod is managed by a Deployment, the Deployment will create another Pod
to be scheduled by Kubernetes.
-->
## 驱逐策略 {#eviction-policy}
{{< glossary_tooltip text="Kubelet" term_id="kubelet" >}} 能够主动监测和防止计算资源的全面短缺。
在资源短缺的情况下,`kubelet` 可以主动地结束一个或多个 Pod 以回收短缺的资源。
`kubelet` 结束一个 Pod 时,它将终止 Pod 中的所有容器,而 Pod 的 `Phase` 将变为 `Failed`
如果被驱逐的 Pod 由 Deployment 管理,这个 Deployment 会创建另一个 Pod 给 Kubernetes 来调度。
## {{% heading "whatsnext" %}}
<!--
- Read [Configure out of resource handling](/docs/tasks/administer-cluster/out-of-resource/) to learn more about eviction signals, thresholds, and handling.
-->
- 阅读[配置资源不足的处理](/zh/docs/tasks/administer-cluster/out-of-resource/)
进一步了解驱逐信号、阈值以及处理方法。

View File

@ -5,11 +5,9 @@ weight: 50
--- ---
<!-- <!--
---
title: Kubernetes Scheduler title: Kubernetes Scheduler
content_type: concept content_type: concept
weight: 50 weight: 50
---
--> -->
<!-- overview --> <!-- overview -->

View File

@ -1,14 +1,14 @@
--- ---
title: 调度器性能调优 title: 调度器性能调优
content_type: concept content_type: concept
weight: 70 weight: 80
--- ---
<!-- <!--
reviewers: reviewers:
- bsalamat - bsalamat
title: Scheduler Performance Tuning title: Scheduler Performance Tuning
content_type: concept content_type: concept
weight: 70 weight: 80
--> -->
<!-- overview --> <!-- overview -->

View File

@ -3,7 +3,7 @@ reviewers:
- ahg-g - ahg-g
title: 调度框架 title: 调度框架
content_type: concept content_type: concept
weight: 60 weight: 70
--- ---
<!-- <!--

View File

@ -29,24 +29,6 @@ nodes become unstable.
<!-- body --> <!-- body -->
<!--
## Eviction Policy
The `kubelet` can proactively monitor for and prevent total starvation of a
compute resource. In those cases, the `kubelet` can reclaim the starved
resource by proactively failing one or more Pods. When the `kubelet` fails
a Pod, it terminates all of its containers and transitions its `PodPhase` to `Failed`.
If the evicted Pod is managed by a Deployment, the Deployment will create another Pod
to be scheduled by Kubernetes.
-->
## 驱逐策略
`kubelet` 能够主动监测和防止计算资源的全面短缺。
在那种情况下,`kubelet` 可以主动地结束一个或多个 Pod 以回收短缺的资源。
`kubelet` 结束一个 Pod 时,它将终止 Pod 中的所有容器,而 Pod 的 `PodPhase` 将变为 `Failed`
如果被驱逐的 Pod 由 Deployment 管理,这个 Deployment 会创建另一个 Pod 给 Kubernetes 来调度。
<!-- <!--
### Eviction Signals ### Eviction Signals
@ -62,7 +44,7 @@ the `kubelet` summary API.
<!-- <!--
| Eviction Signal | Description | | Eviction Signal | Description |
|----------------------------|-----------------------------------------------------------------------| |----------------------------|---------------------------------------------------------------------|
| `memory.available` | `memory.available` := `node.status.capacity[memory]` - `node.stats.memory.workingSet` | | `memory.available` | `memory.available` := `node.status.capacity[memory]` - `node.stats.memory.workingSet` |
| `nodefs.available` | `nodefs.available` := `node.stats.fs.available` | | `nodefs.available` | `nodefs.available` := `node.stats.fs.available` |
| `nodefs.inodesFree` | `nodefs.inodesFree` := `node.stats.fs.inodesFree` | | `nodefs.inodesFree` | `nodefs.inodesFree` := `node.stats.fs.inodesFree` |
@ -70,7 +52,7 @@ the `kubelet` summary API.
| `imagefs.inodesFree` | `imagefs.inodesFree` := `node.stats.runtime.imagefs.inodesFree` | | `imagefs.inodesFree` | `imagefs.inodesFree` := `node.stats.runtime.imagefs.inodesFree` |
--> -->
| 驱逐信号 | 描述 | | 驱逐信号 | 描述 |
|----------------------------|-----------------------------------------------------------------------| |----------------------------|---------------------------------------------------------------------|
| `memory.available` | `memory.available` := `node.status.capacity[memory]` - `node.stats.memory.workingSet` | | `memory.available` | `memory.available` := `node.status.capacity[memory]` - `node.stats.memory.workingSet` |
| `nodefs.available` | `nodefs.available` := `node.stats.fs.available` | | `nodefs.available` | `nodefs.available` := `node.stats.fs.available` |
| `nodefs.inodesFree` | `nodefs.inodesFree` := `node.stats.fs.inodesFree` | | `nodefs.inodesFree` | `nodefs.inodesFree` := `node.stats.fs.inodesFree` |
@ -131,7 +113,7 @@ support in favor of eviction in response to disk pressure.
--> -->
`imagefs` 可选。`kubelet` 使用 cAdvisor 自动发现这些文件系统。 `imagefs` 可选。`kubelet` 使用 cAdvisor 自动发现这些文件系统。
`kubelet` 不关心其它文件系统。当前不支持配置任何其它类型。 `kubelet` 不关心其它文件系统。当前不支持配置任何其它类型。
例如,在专用 `filesytem` 中存储卷和日志是不可以的。 例如,在专用 `filesytem` 中存储卷和日志是 _不可以_ 的。
在将来的发布中,`kubelet`将废除当前存在的 在将来的发布中,`kubelet`将废除当前存在的
[垃圾回收](/zh/docs/concepts/cluster-administration/kubelet-garbage-collection/) [垃圾回收](/zh/docs/concepts/cluster-administration/kubelet-garbage-collection/)