[zh] translate concepts/API-initiated Eviction

pull/28214/head
luzg 2021-05-31 18:11:28 +08:00
parent a7de342b39
commit 85965ec8d0
2 changed files with 85 additions and 0 deletions

View File

@ -0,0 +1,38 @@
---
title: API 发起的驱逐
content_type: concept
weight: 70
---
<!--
---
title: API-initiated Eviction
content_type: concept
weight: 70
---
-->
{{< glossary_definition term_id="api-eviction" length="short" >}} </br>
<!--
You can request eviction by directly calling the Eviction API
using a client of the kube-apiserver, like the `kubectl drain` command.
This creates an `Eviction` object, which causes the API server to terminate the Pod.
API-initiated evictions respect your configured [`PodDisruptionBudgets`](/docs/tasks/run-application/configure-pdb/)
and [`terminationGracePeriodSeconds`](/docs/concepts/workloads/pods/pod-lifecycle#pod-termination).
-->
你可以通过 kube-apiserver 的客户端,比如 `kubectl drain` 这样的命令,直接调用 Eviction API 发起驱逐。
此操作创建一个 `Eviction` 对象,该对象再驱动 API 服务器终止选定的 Pod。
API 发起的驱逐将遵从你的
[`PodDisruptionBudgets`](/zh/docs/tasks/run-application/configure-pdb/)
和 [`terminationGracePeriodSeconds`](/zh/docs/concepts/workloads/pods/pod-lifecycle#pod-termination)
配置。
## {{% heading "whatsnext" %}}
<!--
* Learn about [Node-pressure Eviction](/docs/concepts/scheduling-eviction/node-pressure-eviction/)
* Learn about [Pod Priority and Preemption](/docs/concepts/scheduling-eviction/pod-priority-preemption/)
-->
* 了解[节点压力引发的驱逐](/zh/docs/concepts/scheduling-eviction/node-pressure-eviction/)
* 了解 [Pod 优先级和抢占](/zh/docs/concepts/scheduling-eviction/pod-priority-preemption/)

View File

@ -0,0 +1,47 @@
---
title: API 发起的驱逐
id: api-eviction
date: 2021-04-27
full_link: /zh/docs/concepts/scheduling-eviction/pod-eviction/#api-eviction
short_description: >
API 发起的驱逐是一个先调用 Eviction API 创建驱逐对象,再由该对象体面地中止 Pod 的过程。
aka:
tags:
- operation
---
<!-- ---
title: API-initiated eviction
id: api-eviction
date: 2021-04-27
full_link: /docs/concepts/scheduling-eviction/pod-eviction/#api-eviction
short_description: >
API-initiated eviction is the process by which you use the Eviction API to create an
Eviction object that triggers graceful pod termination.
aka:
tags:
- operation
---
-->
<!--
API-initiated eviction is the process by which you use the [Eviction API](/docs/reference/generated/kubernetes-api/{{<param "version">}}/#create-eviction-pod-v1-core)
to create an `Eviction` object that triggers graceful pod termination.
-->
API 发起的驱逐是一个先调用
[Eviction API](/docs/reference/generated/kubernetes-api/{{<param "version">}}/create-eviction-pod-v1-core)
创建驱逐对象,再由该对象体面地中止 Pod 的过程。
<!--more-->
<!--
You can request eviction either by directly calling the Eviction API
using a client of the kube-apiserver, like the `kubectl drain` command.
When an `Eviction` object is created, the API server terminates the Pod.
API-initiated eviction is not the same as [node-pressure eviction](/docs/concepts/scheduling-eviction/eviction/#kubelet-eviction).
-->
你可以通过 kube-apiserver 的客户端,比如 `kubectl drain` 这样的命令,直接调用 Eviction API 发起驱逐。
`Eviction` 对象创建出来之后,该对象将驱动 API 服务器终止选定的Pod。
API 发起的驱逐不同于
[节点压力引发的驱逐](/zh/docs/concepts/scheduling-eviction/eviction/#kubelet-eviction)。