Skip to content

Commit 54d103a

Browse files
authored
Merge pull request #42029 from asa3311/sync-zh-28
[zh] sync service storage-classes configure-pdb
2 parents b8e03f2 + b76dc83 commit 54d103a

File tree

3 files changed

+40
-19
lines changed

3 files changed

+40
-19
lines changed

content/zh-cn/docs/concepts/services-networking/service.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,17 @@ spec:
195195
```
196196
197197
<!--
198-
Applying this manifest creates a new Service named "my-service", which
198+
Applying this manifest creates a new Service named "my-service" with the default
199+
ClusterIP [service type](#publishing-services-service-types). The Service
199200
targets TCP port 9376 on any Pod with the `app.kubernetes.io/name: MyApp` label.
200201

201202
Kubernetes assigns this Service an IP address (the _cluster IP_),
202203
that is used by the virtual IP address mechanism. For more details on that mechanism,
203204
read [Virtual IPs and Service Proxies](/docs/reference/networking/virtual-ips/).
204205
-->
205-
应用上述清单将创建一个名称为 "my-service" 的新 Service,它在所有 Pod 上指向
206-
TCP 端口 9376,并且具有标签 `app.kubernetes.io/name: MyApp`。
206+
应用上述清单将创建一个名称为 "my-service" 的新 Service,
207+
该服务[服务类型](#publishing-services-service-types)默认为 ClusterIP。
208+
该服务指向带有标签 `app.kubernetes.io/name: MyApp` 的所有 Pod 的TCP 端口 9376。
207209

208210
Kubernetes 为该服务分配一个 IP 地址(有时称为 “集群 IP”),该 IP 地址由虚拟 IP 地址机制使用。
209211
有关该机制的更多详情,请阅读[虚拟 IP 和服务代理](/zh-cn/docs/reference/networking/virtual-ips/)。

content/zh-cn/docs/concepts/storage/storage-classes.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,9 +560,19 @@ using `allowedTopologies`.
560560
{{< note >}}
561561
<!--
562562
`zone` and `zones` parameters are deprecated and replaced with
563-
[allowedTopologies](#allowed-topologies)
563+
[allowedTopologies](#allowed-topologies). When
564+
[GCE CSI Migration](/docs/concepts/storage/volumes/#gce-csi-migration) is
565+
enabled, a GCE PD volume can be provisioned in a topology that does not match
566+
any nodes, but any pod trying to use that volume will fail to schedule. With
567+
legacy pre-migration GCE PD, in this case an error will be produced
568+
instead at provisioning time. GCE CSI Migration is enabled by default beginning
569+
from the Kubernetes 1.23 release.
564570
-->
565571
`zone` 和 `zones` 已被弃用并被 [allowedTopologies](#allowed-topologies) 取代。
572+
当启用 [GCE CSI 迁移](/zh-cn/docs/concepts/storage/volumes/#gce-csi-migration)时,
573+
GCE PD 卷可能被制备在某个与所有节点都不匹配的拓扑域中,但任何尝试使用该卷的 Pod 都无法被调度。
574+
对于传统的迁移前 GCE PD,这种情况下将在制备卷的时候产生错误。
575+
从 Kubernetes 1.23 版本开始,GCE CSI 迁移默认启用。
566576
{{< /note >}}
567577

568578
### NFS {#nfs}

content/zh-cn/docs/tasks/run-application/configure-pdb.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ is enabled.
9595
<!--
9696
You can also use PDBs with pods which are not controlled by one of the above
9797
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).
9999
-->
100100
用户也可以用 PDB 来保护不受上述控制器控制的 Pod,或任意的 Pod 集合,但是正如
101-
[任意控制器和选择算符](#arbitrary-controllers-and-selectors)中描述的,这里存在一些限制。
101+
[任意工作负载和任意选择算符](#arbitrary-controllers-and-selectors)中描述的,这里存在一些限制。
102102

103103
<!--
104104
## Think about how your application reacts to disruptions
@@ -509,23 +509,27 @@ Pods in `Pending`, `Succeeded` or `Failed` phase are always considered for evict
509509
{{< /note >}}
510510

511511
<!--
512-
## Arbitrary Controllers and Selectors
512+
## Arbitrary workloads and arbitrary selectors {#arbitrary-controllers-and-selectors}
513513

514514
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.
517519
-->
518-
## 任意控制器和选择算符 {#arbitrary-controllers-and-selectors}
520+
## 任意工作负载和任意选择算符 {#arbitrary-controllers-and-selectors}
519521

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 所属资源的选择算符完全匹配,那么可以跳过这一节。
522526

523527
<!--
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
525529
"operator", or bare pods, but with these restrictions:
526530
-->
527-
你可以使用这样的 PDB:它对应的 Pod 可能由其他类型的控制器控制,可能由 "operator" 控制,
528-
也可能为“裸的(不受控制器控制)” Pod,但该类 PDB 存在以下限制
531+
你可以针对由其他资源、某个 "operator" 控制的或者“裸的(不受控制器控制)” Pod
532+
使用 PDB,但存在以下限制
529533

530534
<!--
531535
- 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
535539
- 只能够使用整数作为 `.spec.minAvailable` 的值,而不能使用百分比。
536540

537541
<!--
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,
540547
so most users will want to avoid overlapping selectors. One reasonable use of overlapping
541548
PDBs is when pods are being transitioned from one PDB to another.
542549
-->
543-
你可以令选择算符选择一个内置控制器所控制 Pod 的子集或父集。
550+
你无法使用其他的可用性配置,因为如果没有被支持的属主资源,Kubernetes 无法推导出 Pod 的总数。
551+
552+
你可以使用能够选择属于工作负载资源的 Pod 的子集或超集的选择算符。
544553
驱逐 API 将不允许驱逐被多个 PDB 覆盖的任何 Pod,因此大多数用户都希望避免重叠的选择算符。
545-
重叠 PDB 的一种合理用途是当 Pod 从一个 PDB 过渡到另一个 PDB 时再使用
554+
重叠 PDB 的一种合理用途是将 Pod 从一个 PDB 转交到另一个 PDB 的场合

0 commit comments

Comments
 (0)