diff --git a/content/zh-cn/docs/concepts/windows/intro.md b/content/zh-cn/docs/concepts/windows/intro.md index fd978928368..4eba239d459 100644 --- a/content/zh-cn/docs/concepts/windows/intro.md +++ b/content/zh-cn/docs/concepts/windows/intro.md @@ -133,6 +133,7 @@ Kubernetes 关键组件在 Windows 上的工作方式与在 Linux 上相同。 Linux containers in the same Pod. All containers in a Pod are scheduled onto a single Node where each Node represents a specific platform and architecture. The following Pod capabilities, properties and events are supported with Windows containers: + * Single or multiple containers per Pod with process isolation and volume sharing * Pod `status` fields * Readiness, liveness, and startup probes @@ -142,6 +143,7 @@ Kubernetes 关键组件在 Windows 上的工作方式与在 Linux 上相同。 * Named pipe host mounts * Resource limits * OS field: + The `.spec.os.name` field should be set to `windows` to indicate that the current Pod uses Windows containers. The `IdentifyPodOS` feature gate needs to be enabled for this field to be recognized. @@ -268,7 +270,7 @@ Some kubelet command line options behave differently on Windows, as described be * `--windows-priorityclass` 允许你设置 kubelet 进程的调度优先级 (参考 [CPU 资源管理](/zh-cn/docs/concepts/configuration/windows-resource-management/#resource-management-cpu))。 -* `--kubelet-reserve`、`--system-reserve` 和 `--eviction-hard` 标志更新 +* `--kube-reserved`、`--system-reserved` 和 `--eviction-hard` 标志更新 [NodeAllocatable](/zh-cn/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable)。 * 未实现使用 `--enforce-node-allocable` 驱逐。 * 未实现使用 `--eviction-hard` 和 `--eviction-soft` 驱逐。 @@ -341,6 +343,7 @@ At a high level, these OS concepts are different: * Console apps handle Ctrl-C or Ctrl-break using a Control Handler. * Services register a Service Control Handler function that can accept `SERVICE_CONTROL_STOP` control codes. + Container exit codes follow the same convention where 0 is success, and nonzero is failure. The specific error codes may differ across Windows and Linux. However, exit codes passed from the Kubernetes components (kubelet, kube-proxy) are unchanged. @@ -598,7 +601,8 @@ kernel patch. @@ -706,7 +710,8 @@ Kubernetes [集群 API](https://cluster-api.sigs.k8s.io/) 项目也提供了自 +{{< note >}} +当一个 Pod 被删除时,执行一些 kubectl 命令会展示这个 Pod 的状态为 `Terminating`(终止)。 +这个 `Terminating` 状态并不是 Pod 阶段之一。 +Pod 被赋予一个可以体面终止的期限,默认为 30 秒。 +你可以使用 `--force` 参数来[强制终止 Pod](/zh-cn/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination-forced)。 +{{< /note >}} + #### 何时该使用启动探针? {#when-should-you-use-a-startup-probe} -{{< feature-state for_k8s_version="v1.18" state="beta" >}} +{{< feature-state for_k8s_version="v1.20" state="stable" >}} 设计的目标是令你能够请求删除进程,并且知道进程何时被终止,同时也能够确保删除 @@ -719,7 +733,7 @@ Pod。 Typically, the container runtime sends a TERM signal to the main process in each container. Many container runtimes respect the `STOPSIGNAL` value defined in the container image and send this instead of TERM. -Once the grace period has expired, the KILL signal is sent to any remainig +Once the grace period has expired, the KILL signal is sent to any remaining processes, and the Pod is then deleted from the {{< glossary_tooltip text="API Server" term_id="kube-apiserver" >}}. If the kubelet or the container runtime's management service is restarted while waiting for processes to terminate, the @@ -828,7 +842,7 @@ An example flow: Forced deletions can be potentially disruptive for some workloads and their Pods. By default, all deletes are graceful within 30 seconds. The `kubectl delete` command supports -the `-grace-period=` option which allows you to override the default and specify your +the `--grace-period=` option which allows you to override the default and specify your own value. --> ### 强制终止 Pod {#pod-termination-forced}