Skip to content

Commit 3c8ce0e

Browse files
committed
Sync pod-lifecycle.md
1 parent 6637a17 commit 3c8ce0e

File tree

2 files changed

+28
-9
lines changed

2 files changed

+28
-9
lines changed

content/zh-cn/docs/concepts/windows/intro.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ Kubernetes 关键组件在 Windows 上的工作方式与在 Linux 上相同。
133133
Linux containers in the same Pod. All containers in a Pod are scheduled onto a single
134134
Node where each Node represents a specific platform and architecture. The following
135135
Pod capabilities, properties and events are supported with Windows containers:
136+
136137
* Single or multiple containers per Pod with process isolation and volume sharing
137138
* Pod `status` fields
138139
* Readiness, liveness, and startup probes
@@ -142,6 +143,7 @@ Kubernetes 关键组件在 Windows 上的工作方式与在 Linux 上相同。
142143
* Named pipe host mounts
143144
* Resource limits
144145
* OS field:
146+
145147
The `.spec.os.name` field should be set to `windows` to indicate that the current Pod uses Windows containers.
146148
The `IdentifyPodOS` feature gate needs to be enabled for this field to be recognized.
147149
@@ -268,7 +270,7 @@ Some kubelet command line options behave differently on Windows, as described be
268270
<!--
269271
* The `--windows-priorityclass` lets you set the scheduling priority of the kubelet process
270272
(see [CPU resource management](/docs/concepts/configuration/windows-resource-management/#resource-management-cpu))
271-
* The `--kubelet-reserve`, `--system-reserve` , and `--eviction-hard` flags update
273+
* The `--kube-reserved`, `--system-reserved` , and `--eviction-hard` flags update
272274
[NodeAllocatable](/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable)
273275
* Eviction by using `--enforce-node-allocable` is not implemented
274276
* Eviction by using `--eviction-hard` and `--eviction-soft` are not implemented
@@ -282,7 +284,7 @@ Some kubelet command line options behave differently on Windows, as described be
282284
-->
283285
* `--windows-priorityclass` 允许你设置 kubelet 进程的调度优先级
284286
(参考 [CPU 资源管理](/zh-cn/docs/concepts/configuration/windows-resource-management/#resource-management-cpu))。
285-
* `--kubelet-reserve``--system-reserve``--eviction-hard` 标志更新
287+
* `--kube-reserved``--system-reserved``--eviction-hard` 标志更新
286288
[NodeAllocatable](/zh-cn/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable)
287289
* 未实现使用 `--enforce-node-allocable` 驱逐。
288290
* 未实现使用 `--eviction-hard``--eviction-soft` 驱逐。
@@ -341,6 +343,7 @@ At a high level, these OS concepts are different:
341343
* Console apps handle Ctrl-C or Ctrl-break using a Control Handler.
342344
* Services register a Service Control Handler function that can accept
343345
`SERVICE_CONTROL_STOP` control codes.
346+
344347
Container exit codes follow the same convention where 0 is success, and nonzero is failure.
345348
The specific error codes may differ across Windows and Linux. However, exit codes
346349
passed from the Kubernetes components (kubelet, kube-proxy) are unchanged.
@@ -598,7 +601,8 @@ kernel patch.
598601
<!--
599602
#### Mirantis Container Runtime {#mcr}
600603
601-
[Mirantis Container Runtime](https://docs.mirantis.com/mcr/20.10/overview.html) (MCR) is available as a container runtime for all Windows Server 2019 and later versions.
604+
[Mirantis Container Runtime](https://docs.mirantis.com/mcr/20.10/overview.html) (MCR)
605+
is available as a container runtime for all Windows Server 2019 and later versions.
602606
603607
See [Install MCR on Windows Servers](https://docs.mirantis.com/mcr/20.10/install/mcr-windows.html) for more information.
604608
-->
@@ -706,7 +710,8 @@ Kubernetes [集群 API](https://cluster-api.sigs.k8s.io/) 项目也提供了自
706710
<!--
707711
### Windows distribution channels
708712
709-
For a detailed explanation of Windows distribution channels see the [Microsoft documentation](https://docs.microsoft.com/en-us/windows-server/get-started-19/servicing-channels-19).
713+
For a detailed explanation of Windows distribution channels see the
714+
[Microsoft documentation](https://docs.microsoft.com/en-us/windows-server/get-started-19/servicing-channels-19).
710715
711716
Information on the different Windows Server servicing channels
712717
including their support models can be found at

content/zh-cn/docs/concepts/workloads/pods/pod-lifecycle.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,19 @@ Value | Description
159159
`Failed`(失败) | Pod 中的所有容器都已终止,并且至少有一个容器是因为失败终止。也就是说,容器以非 0 状态退出或者被系统终止。
160160
`Unknown`(未知) | 因为某些原因无法取得 Pod 的状态。这种情况通常是因为与 Pod 所在主机通信失败。
161161

162+
<!--
163+
When a Pod is being deleted, it is shown as `Terminating` by some kubectl commands.
164+
This `Terminating` status is not one of the Pod phases.
165+
A Pod is granted a term to terminate gracefully, which defaults to 30 seconds.
166+
You can use the flag `--force` to [terminate a Pod by force](/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination-forced).
167+
-->
168+
{{< note >}}
169+
当一个 Pod 被删除时,执行一些 kubectl 命令会展示这个 Pod 的状态为 `Terminating`(终止)。
170+
这个 `Terminating` 状态并不是 Pod 阶段之一。
171+
Pod 被赋予一个可以体面终止的期限,默认为 30 秒。
172+
你可以使用 `--force` 参数来[强制终止 Pod](/zh-cn/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination-forced)
173+
{{< /note >}}
174+
162175
<!--
163176
If a node dies or is disconnected from the rest of the cluster, Kubernetes
164177
applies a policy for setting the `phase` of all Pods on the lost node to Failed.
@@ -312,6 +325,7 @@ Pod 有一个 PodStatus 对象,其中包含一个
312325

313326
<!--
314327
Field name | Description
328+
:--------------------|:-----------
315329
`type` | Name of this Pod condition.
316330
`status` | Indicates whether that condition is applicable, with possible values "`True`", "`False`", or "`Unknown`".
317331
`lastProbeTime` | Timestamp of when the Pod condition was last probed.
@@ -339,7 +353,7 @@ specify a list of additional conditions that the kubelet evaluates for Pod readi
339353

340354
{{< feature-state for_k8s_version="v1.14" state="stable" >}}
341355

342-
你的应用可以向 PodStatus 中注入额外的反馈或者信号:_Pod Readiness(Pod 就绪态)_
356+
你的应用可以向 PodStatus 中注入额外的反馈或者信号:**Pod Readiness(Pod 就绪态)**
343357
要使用这一特性,可以设置 Pod 规约中的 `readinessGates` 列表,为 kubelet
344358
提供一组额外的状况供其评估 Pod 就绪态时使用。
345359

@@ -662,7 +676,7 @@ to stop.
662676
-->
663677
#### 何时该使用启动探针? {#when-should-you-use-a-startup-probe}
664678

665-
{{< feature-state for_k8s_version="v1.18" state="beta" >}}
679+
{{< feature-state for_k8s_version="v1.20" state="stable" >}}
666680

667681
<!--
668682
Startup probes are useful for Pods that have containers that take a long time to
@@ -706,7 +720,7 @@ The design aim is for you to be able to request deletion and know when processes
706720
terminate, but also be able to ensure that deletes eventually complete.
707721
When you request deletion of a Pod, the cluster records and tracks the intended grace period
708722
before the Pod is allowed to be forcefully killed. With that forceful shutdown tracking in
709-
place, the {< glossary_tooltip text="kubelet" term_id="kubelet" >}} attempts graceful
723+
place, the {{< glossary_tooltip text="kubelet" term_id="kubelet" >}} attempts graceful
710724
shutdown.
711725
-->
712726
设计的目标是令你能够请求删除进程,并且知道进程何时被终止,同时也能够确保删除
@@ -719,7 +733,7 @@ Pod。
719733
Typically, the container runtime sends a TERM signal to the main process in each
720734
container. Many container runtimes respect the `STOPSIGNAL` value defined in the container
721735
image and send this instead of TERM.
722-
Once the grace period has expired, the KILL signal is sent to any remainig
736+
Once the grace period has expired, the KILL signal is sent to any remaining
723737
processes, and the Pod is then deleted from the
724738
{{< glossary_tooltip text="API Server" term_id="kube-apiserver" >}}. If the kubelet or the
725739
container runtime's management service is restarted while waiting for processes to terminate, the
@@ -828,7 +842,7 @@ An example flow:
828842
Forced deletions can be potentially disruptive for some workloads and their Pods.
829843
830844
By default, all deletes are graceful within 30 seconds. The `kubectl delete` command supports
831-
the `-grace-period=<seconds>` option which allows you to override the default and specify your
845+
the `--grace-period=<seconds>` option which allows you to override the default and specify your
832846
own value.
833847
-->
834848
### 强制终止 Pod {#pod-termination-forced}

0 commit comments

Comments
 (0)