[zh] Resync concepts section (7)

This commit is contained in:
Qiming Teng
2021-04-28 11:27:08 +08:00
parent c8ce9801a5
commit 210775f691
5 changed files with 72 additions and 89 deletions
@@ -5,6 +5,10 @@ weight: 60
---
<!--
reviewers:
- erictune
- foxish
- davidopp
title: Disruptions
content_type: concept
weight: 60
@@ -136,18 +140,18 @@ Here are some ways to mitigate involuntary disruptions:
[stateless](/docs/tasks/run-application/run-stateless-application-deployment/)
and [stateful](/docs/tasks/run-application/run-replicated-stateful-application/) applications.)
- For even higher availability when running replicated applications,
spread applications across racks (using
[anti-affinity](/docs/user-guide/node-selection/#inter-pod-affinity-and-anti-affinity-beta-feature))
or across zones (if using a
[multi-zone cluster](/docs/setup/multiple-zones).)
spread applications across racks (using
[anti-affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity))
or across zones (if using a
[multi-zone cluster](/docs/setup/multiple-zones).)
-->
- 确保 Pod 在请求中给出[所需资源](/zh/docs/tasks/configure-pod-container/assign-memory-resource/)。
- 如果需要更高的可用性,请复制应用程序。
(了解有关运行多副本的[无状态](/zh/docs/tasks/run-application/run-stateless-application-deployment/)
和[有状态](/zh/docs/tasks/run-application/run-replicated-stateful-application/)应用程序的信息。)
- 为了在运行复制应用程序时获得更高的可用性,请跨机架(使用
[反亲和性](/zh/docs/concepts/scheduling-eviction/assign-pod-node/))或跨区域
(如果使用[多区域集群](/zh/docs/setup/best-practices/multiple-zones/))扩展应用程序。
[反亲和性](/zh/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity)
或跨区域(如果使用[多区域集群](/zh/docs/setup/best-practices/multiple-zones/))扩展应用程序。
<!--
The frequency of voluntary disruptions varies. On a basic Kubernetes cluster, there are
@@ -186,9 +190,9 @@ number needed for a quorum. A web front end might want to
ensure that the number of replicas serving load never falls below a certain
percentage of the total.
-->
## 干扰预算
## 干扰预算 {#pod-disruption-budgets}
{{< feature-state for_k8s_version="v1.5" state="beta" >}}
{{< feature-state for_k8s_version="v1.21" state="stable" >}}
即使你会经常引入自愿性干扰,Kubernetes 也能够支持你运行高度可用的应用。
@@ -199,11 +203,11 @@ Web 前端可能希望确保提供负载的副本数量永远不会低于总数
<!--
Cluster managers and hosting providers should use tools which
respect Pod Disruption Budgets by calling the [Eviction API](/docs/tasks/administer-cluster/safely-drain-node/#the-eviction-api)
respect PodDisruptionBudgets by calling the [Eviction API](/docs/tasks/administer-cluster/safely-drain-node/#eviction-api)
instead of directly deleting pods or deployments. Examples are the `kubectl drain` command
and the Kubernetes-on-GCE cluster upgrade script (`cluster/gce/upgrade.sh`).
-->
集群管理员和托管提供商应该使用遵循 Pod Disruption Budgets 的接口
集群管理员和托管提供商应该使用遵循 PodDisruptionBudgets 的接口
(通过调用[Eviction API](/zh/docs/tasks/administer-cluster/safely-drain-node/#the-eviction-api)),
而不是直接删除 Pod 或 Deployment。
@@ -264,7 +268,7 @@ during application updates is configured in spec for the specific workload resou
When a pod is evicted using the eviction API, it is gracefully
[terminated](/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination),
hornoring the
`terminationGracePeriodSeconds` setting in its [PodSpec](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podspec-v1-core).)
`terminationGracePeriodSeconds` setting in its [PodSpec](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podspec-v1-core).
-->
当使用驱逐 API 驱逐 Pod 时,Pod 会被体面地
[终止](/zh/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination),期间会