diff --git a/content/zh/docs/concepts/scheduling-eviction/api-eviction.md b/content/zh/docs/concepts/scheduling-eviction/api-eviction.md new file mode 100644 index 0000000000..ee90cf9dd6 --- /dev/null +++ b/content/zh/docs/concepts/scheduling-eviction/api-eviction.md @@ -0,0 +1,38 @@ +--- +title: API 发起的驱逐 +content_type: concept +weight: 70 +--- + +{{< glossary_definition term_id="api-eviction" length="short" >}}
+ + +你可以通过 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" %}} + + +* 了解[节点压力引发的驱逐](/zh/docs/concepts/scheduling-eviction/node-pressure-eviction/) +* 了解 [Pod 优先级和抢占](/zh/docs/concepts/scheduling-eviction/pod-priority-preemption/) diff --git a/content/zh/docs/reference/glossary/api-eviction.md b/content/zh/docs/reference/glossary/api-eviction.md new file mode 100644 index 0000000000..9ce3069879 --- /dev/null +++ b/content/zh/docs/reference/glossary/api-eviction.md @@ -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 +--- + + + +API 发起的驱逐是一个先调用 +[Eviction API](/docs/reference/generated/kubernetes-api/{{}}/create-eviction-pod-v1-core) +创建驱逐对象,再由该对象体面地中止 Pod 的过程。 + + + + +你可以通过 kube-apiserver 的客户端,比如 `kubectl drain` 这样的命令,直接调用 Eviction API 发起驱逐。 +当 `Eviction` 对象创建出来之后,该对象将驱动 API 服务器终止选定的Pod。 + +API 发起的驱逐不同于 +[节点压力引发的驱逐](/zh/docs/concepts/scheduling-eviction/eviction/#kubelet-eviction)。