File tree Expand file tree Collapse file tree 2 files changed +85
-0
lines changed
concepts/scheduling-eviction Expand file tree Collapse file tree 2 files changed +85
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : API 发起的驱逐
3
+ content_type : concept
4
+ weight : 70
5
+ ---
6
+ <!--
7
+ ---
8
+ title: API-initiated Eviction
9
+ content_type: concept
10
+ weight: 70
11
+ ---
12
+ -->
13
+ {{< glossary_definition term_id="api-eviction" length="short" >}} </br >
14
+
15
+ <!--
16
+ You can request eviction by directly calling the Eviction API
17
+ using a client of the kube-apiserver, like the `kubectl drain` command.
18
+ This creates an `Eviction` object, which causes the API server to terminate the Pod.
19
+
20
+ API-initiated evictions respect your configured [`PodDisruptionBudgets`](/docs/tasks/run-application/configure-pdb/)
21
+ and [`terminationGracePeriodSeconds`](/docs/concepts/workloads/pods/pod-lifecycle#pod-termination).
22
+ -->
23
+ 你可以通过 kube-apiserver 的客户端,比如 ` kubectl drain ` 这样的命令,直接调用 Eviction API 发起驱逐。
24
+ 此操作创建一个 ` Eviction ` 对象,该对象再驱动 API 服务器终止选定的 Pod。
25
+
26
+ API 发起的驱逐将遵从你的
27
+ [ ` PodDisruptionBudgets ` ] ( /zh/docs/tasks/run-application/configure-pdb/ )
28
+ 和 [ ` terminationGracePeriodSeconds ` ] ( /zh/docs/concepts/workloads/pods/pod-lifecycle#pod-termination )
29
+ 配置。
30
+
31
+ ## {{% heading "whatsnext" %}}
32
+
33
+ <!--
34
+ * Learn about [Node-pressure Eviction](/docs/concepts/scheduling-eviction/node-pressure-eviction/)
35
+ * Learn about [Pod Priority and Preemption](/docs/concepts/scheduling-eviction/pod-priority-preemption/)
36
+ -->
37
+ * 了解[ 节点压力引发的驱逐] ( /zh/docs/concepts/scheduling-eviction/node-pressure-eviction/ )
38
+ * 了解 [ Pod 优先级和抢占] ( /zh/docs/concepts/scheduling-eviction/pod-priority-preemption/ )
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : API 发起的驱逐
3
+ id : api-eviction
4
+ date : 2021-04-27
5
+ full_link : /zh/docs/concepts/scheduling-eviction/pod-eviction/#api-eviction
6
+ short_description : >
7
+ API 发起的驱逐是一个先调用 Eviction API 创建驱逐对象,再由该对象体面地中止 Pod 的过程。
8
+ aka :
9
+ tags :
10
+ - operation
11
+ ---
12
+
13
+ <!-- ---
14
+ title: API-initiated eviction
15
+ id: api-eviction
16
+ date: 2021-04-27
17
+ full_link: /docs/concepts/scheduling-eviction/pod-eviction/#api-eviction
18
+ short_description: >
19
+ API-initiated eviction is the process by which you use the Eviction API to create an
20
+ Eviction object that triggers graceful pod termination.
21
+ aka:
22
+ tags:
23
+ - operation
24
+ ---
25
+ -->
26
+ <!--
27
+ 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)
28
+ to create an `Eviction` object that triggers graceful pod termination.
29
+ -->
30
+ API 发起的驱逐是一个先调用
31
+ [ Eviction API] (/docs/reference/generated/kubernetes-api/{{<param "version">}}/create-eviction-pod-v1-core)
32
+ 创建驱逐对象,再由该对象体面地中止 Pod 的过程。
33
+
34
+ <!-- more-->
35
+
36
+ <!--
37
+ You can request eviction either by directly calling the Eviction API
38
+ using a client of the kube-apiserver, like the `kubectl drain` command.
39
+ When an `Eviction` object is created, the API server terminates the Pod.
40
+
41
+ API-initiated eviction is not the same as [node-pressure eviction](/docs/concepts/scheduling-eviction/eviction/#kubelet-eviction).
42
+ -->
43
+ 你可以通过 kube-apiserver 的客户端,比如 ` kubectl drain ` 这样的命令,直接调用 Eviction API 发起驱逐。
44
+ 当 ` Eviction ` 对象创建出来之后,该对象将驱动 API 服务器终止选定的Pod。
45
+
46
+ API 发起的驱逐不同于
47
+ [ 节点压力引发的驱逐] ( /zh/docs/concepts/scheduling-eviction/eviction/#kubelet-eviction ) 。
You can’t perform that action at this time.
0 commit comments