@@ -95,10 +95,10 @@ is enabled.
95
95
<!--
96
96
You can also use PDBs with pods which are not controlled by one of the above
97
97
controllers, or arbitrary groups of pods, but there are some restrictions,
98
- described in [Arbitrary Controllers and Selectors ](#arbitrary-controllers-and-selectors).
98
+ described in [Arbitrary workloads and arbitrary selectors ](#arbitrary-controllers-and-selectors).
99
99
-->
100
100
用户也可以用 PDB 来保护不受上述控制器控制的 Pod,或任意的 Pod 集合,但是正如
101
- [ 任意控制器和选择算符 ] ( #arbitrary-controllers-and-selectors ) 中描述的,这里存在一些限制。
101
+ [ 任意工作负载和任意选择算符 ] ( #arbitrary-controllers-and-selectors ) 中描述的,这里存在一些限制。
102
102
103
103
<!--
104
104
## Think about how your application reacts to disruptions
@@ -509,23 +509,27 @@ Pods in `Pending`, `Succeeded` or `Failed` phase are always considered for evict
509
509
{{< /note >}}
510
510
511
511
<!--
512
- # # Arbitrary Controllers and Selectors
512
+ # # Arbitrary workloads and arbitrary selectors {#arbitrary-controllers-and-selectors}
513
513
514
514
You can skip this section if you only use PDBs with the built-in
515
- application controllers (Deployment, ReplicationController, ReplicaSet, and StatefulSet),
516
- with the PDB selector matching the controller's selector.
515
+ workload resources (Deployment, ReplicaSet, StatefulSet and ReplicationController)
516
+ or with {{< glossary_tooltip term_id="CustomResourceDefinition" text="custom resources" >}}
517
+ that implement a `scale` [subresource](/docs/concepts/extend-kubernetes/api-extension/custom-resources/#advanced-features-and-flexibility),
518
+ and where the PDB selector exactly matches the selector of the Pod's owning resource.
517
519
-->
518
- # # 任意控制器和选择算符 {#arbitrary-controllers-and-selectors}
520
+ # # 任意工作负载和任意选择算符 {#arbitrary-controllers-and-selectors}
519
521
520
- 如果你只使用与内置的应用控制器(Deployment、ReplicationController、ReplicaSet 和 StatefulSet)
521
- 对应的 PDB,也就是 PDB 的选择算符与 控制器的选择算符相匹配,那么可以跳过这一节。
522
+ 如果你只针对内置的工作负载资源(Deployment、ReplicaSet、StatefulSet 和 ReplicationController)
523
+ 或在实现了 `scale` [子资源](/zh-cn/docs/concepts/extend-kubernetes/api-extension/custom-resources/#advanced-features-and-flexibility)
524
+ 的{{< glossary_tooltip term_id="CustomResourceDefinition" text="自定义资源" >}}使用 PDB,
525
+ 并且 PDB 选择算符与 Pod 所属资源的选择算符完全匹配,那么可以跳过这一节。
522
526
523
527
<!--
524
- You can use a PDB with pods controlled by another type of controller , by an
528
+ You can use a PDB with pods controlled by another resource , by an
525
529
" operator" , or bare pods, but with these restrictions:
526
530
-->
527
- 你可以使用这样的 PDB:它对应的 Pod 可能由其他类型的控制器控制,可能由 "operator" 控制,
528
- 也可能为“裸的(不受控制器控制)” Pod,但该类 PDB 存在以下限制 :
531
+ 你可以针对由其他资源、某个 "operator" 控制的或者“裸的(不受控制器控制)” Pod
532
+ 使用 PDB,但存在以下限制 :
529
533
530
534
<!--
531
535
- only `.spec.minAvailable` can be used, not `.spec.maxUnavailable`.
@@ -535,11 +539,16 @@ You can use a PDB with pods controlled by another type of controller, by an
535
539
- 只能够使用整数作为 `.spec.minAvailable` 的值,而不能使用百分比。
536
540
537
541
<!--
538
- You can use a selector which selects a subset or superset of the pods belonging to a built-in
539
- controller. The eviction API will disallow eviction of any pod covered by multiple PDBs,
542
+ It is not possible to use other availability configurations,
543
+ because Kubernetes cannot derive a total number of pods without a supported owning resource.
544
+
545
+ You can use a selector which selects a subset or superset of the pods belonging to a
546
+ workload resource. The eviction API will disallow eviction of any pod covered by multiple PDBs,
540
547
so most users will want to avoid overlapping selectors. One reasonable use of overlapping
541
548
PDBs is when pods are being transitioned from one PDB to another.
542
549
-->
543
- 你可以令选择算符选择一个内置控制器所控制 Pod 的子集或父集。
550
+ 你无法使用其他的可用性配置,因为如果没有被支持的属主资源,Kubernetes 无法推导出 Pod 的总数。
551
+
552
+ 你可以使用能够选择属于工作负载资源的 Pod 的子集或超集的选择算符。
544
553
驱逐 API 将不允许驱逐被多个 PDB 覆盖的任何 Pod,因此大多数用户都希望避免重叠的选择算符。
545
- 重叠 PDB 的一种合理用途是当 Pod 从一个 PDB 过渡到另一个 PDB 时再使用 。
554
+ 重叠 PDB 的一种合理用途是将 Pod 从一个 PDB 转交到另一个 PDB 的场合 。
0 commit comments