Skip to content

Commit 803ca1b

Browse files
authored
Merge pull request #33891 from mengjiao-liu/sunc-1.24-concepts-3
[zh] Sync 1.24 concepts-3
2 parents 8914429 + b2a646a commit 803ca1b

File tree

2 files changed

+159
-131
lines changed

2 files changed

+159
-131
lines changed

content/zh/docs/concepts/storage/persistent-volumes.md

Lines changed: 101 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,97 @@ However, the particular path specified in the custom recycler Pod template in th
374374
定制回收器 Pod 模板中在 `volumes` 部分所指定的特定路径要替换为
375375
正被回收的卷的路径。
376376

377+
<!--
378+
### PersistentVolume deletion protection finalizer
379+
380+
Finalizers can be added on a PersistentVolume to ensure that PersistentVolumes
381+
having `Delete` reclaim policy are deleted only after the backing storage are deleted.
382+
-->
383+
### PersistentVolume 删除保护 finalizer {#persistentvolume-deletion-protection-finalizer}
384+
{{< feature-state for_k8s_version="v1.23" state="alpha" >}}
385+
386+
可以在 PersistentVolume 上添加终结器(Finalizers),以确保只有在删除对应的存储后才删除具有
387+
`Delete` 回收策略的 PersistentVolume。
388+
389+
<!--
390+
The newly introduced finalizers `kubernetes.io/pv-controller` and `external-provisioner.volume.kubernetes.io/finalizer`
391+
are only added to dynamically provisioned volumes.
392+
393+
The finalizer `kubernetes.io/pv-controller` is added to in-tree plugin volumes. The following is an example
394+
-->
395+
新引入的 `kubernetes.io/pv-controller` 和 `external-provisioner.volume.kubernetes.io/finalizer`
396+
终结器仅会被添加到动态制备的卷上。
397+
398+
终结器 `kubernetes.io/pv-controller` 会被添加到树内插件卷上。
399+
下面是一个例子:
400+
401+
```shell
402+
kubectl describe pv pvc-74a498d6-3929-47e8-8c02-078c1ece4d78
403+
Name: pvc-74a498d6-3929-47e8-8c02-078c1ece4d78
404+
Labels: <none>
405+
Annotations: kubernetes.io/createdby: vsphere-volume-dynamic-provisioner
406+
pv.kubernetes.io/bound-by-controller: yes
407+
pv.kubernetes.io/provisioned-by: kubernetes.io/vsphere-volume
408+
Finalizers: [kubernetes.io/pv-protection kubernetes.io/pv-controller]
409+
StorageClass: vcp-sc
410+
Status: Bound
411+
Claim: default/vcp-pvc-1
412+
Reclaim Policy: Delete
413+
Access Modes: RWO
414+
VolumeMode: Filesystem
415+
Capacity: 1Gi
416+
Node Affinity: <none>
417+
Message:
418+
Source:
419+
Type: vSphereVolume (a Persistent Disk resource in vSphere)
420+
VolumePath: [vsanDatastore] d49c4a62-166f-ce12-c464-020077ba5d46/kubernetes-dynamic-pvc-74a498d6-3929-47e8-8c02-078c1ece4d78.vmdk
421+
FSType: ext4
422+
StoragePolicyName: vSAN Default Storage Policy
423+
Events: <none>
424+
```
425+
426+
<!--
427+
The finalizer `external-provisioner.volume.kubernetes.io/finalizer` is added for CSI volumes.
428+
The following is an example:
429+
-->
430+
终结器 `external-provisioner.volume.kubernetes.io/finalizer` 会被添加到 CSI 卷上。下面是一个例子:
431+
432+
```shell
433+
Name: pvc-2f0bab97-85a8-4552-8044-eb8be45cf48d
434+
Labels: <none>
435+
Annotations: pv.kubernetes.io/provisioned-by: csi.vsphere.vmware.com
436+
Finalizers: [kubernetes.io/pv-protection external-provisioner.volume.kubernetes.io/finalizer]
437+
StorageClass: fast
438+
Status: Bound
439+
Claim: demo-app/nginx-logs
440+
Reclaim Policy: Delete
441+
Access Modes: RWO
442+
VolumeMode: Filesystem
443+
Capacity: 200Mi
444+
Node Affinity: <none>
445+
Message:
446+
Source:
447+
Type: CSI (a Container Storage Interface (CSI) volume source)
448+
Driver: csi.vsphere.vmware.com
449+
FSType: ext4
450+
VolumeHandle: 44830fa8-79b4-406b-8b58-621ba25353fd
451+
ReadOnly: false
452+
VolumeAttributes: storage.kubernetes.io/csiProvisionerIdentity=1648442357185-8081-csi.vsphere.vmware.com
453+
type=vSphere CNS Block Volume
454+
Events: <none>
455+
```
456+
457+
<!--
458+
Enabling the `CSIMigration` feature for a specific in-tree volume plugin will remove
459+
the `kubernetes.io/pv-controller` finalizer, while adding the `external-provisioner.volume.kubernetes.io/finalizer`
460+
finalizer. Similarly, disabling `CSIMigration` will remove the `external-provisioner.volume.kubernetes.io/finalizer`
461+
finalizer, while adding the `kubernetes.io/pv-controller` finalizer.
462+
-->
463+
为特定的树内卷插件启用 `CSIMigration` 特性将删除 `kubernetes.io/pv-controller` 终结器,
464+
同时添加 `external-provisioner.volume.kubernetes.io/finalizer` 终结器。
465+
同样,禁用 `CSIMigration` 将删除 `external-provisioner.volume.kubernetes.io/finalizer` 终结器,
466+
同时添加 `kubernetes.io/pv-controller` 终结器。
467+
377468
<!--
378469
### Reserving a PersistentVolume
379470

@@ -550,19 +641,7 @@ FlexVolume 卷(于 Kubernetes v1.23 弃用)可以在 Pod 重启期间调整
550641
-->
551642
#### 重设使用中 PVC 申领的大小 {#resizing-an-in-use-persistentvolumevlaim}
552643

553-
{{< feature-state for_k8s_version="v1.15" state="beta" >}}
554-
555-
<!--
556-
Expanding in-use PVCs is available as beta since Kubernetes 1.15, and as alpha since 1.11. The `ExpandInUsePersistentVolumes` feature must be enabled, which is the case automatically for many clusters for beta features. Refer to the [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) documentation for more information.
557-
-->
558-
{{< note >}}
559-
Kubernetes 从 1.15 版本开始将调整使用中 PVC 申领大小这一能力作为 Beta
560-
特性支持;该特性在 1.11 版本以来处于 Alpha 阶段。
561-
`ExpandInUsePersistentVolumes` 特性必须被启用;在很多集群上,与此类似的
562-
Beta 阶段的特性是自动启用的。
563-
可参考[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
564-
文档了解更多信息。
565-
{{< /note >}}
644+
{{< feature-state for_k8s_version="v1.24" state="stable" >}}
566645

567646
<!--
568647
In this case, you don't need to delete and recreate a Pod or deployment that is using an existing PVC.
@@ -640,13 +719,13 @@ Recovery from failing PVC expansion by users is available as an alpha feature si
640719
-->
641720
{{< note >}}
642721
Kubernetes 从 1.23 版本开始将允许用户恢复失败的 PVC 扩展这一能力作为
643-
alpha 特性支持。 `RecoverVolumeExpansionFailure` 必须被启用以允许使用此功能
722+
alpha 特性支持。 `RecoverVolumeExpansionFailure` 必须被启用以允许使用此特性
644723
可参考[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
645724
文档了解更多信息。
646725
{{< /note >}}
647726

648727
<!--
649-
If the feature gates `ExpandPersistentVolumes` and `RecoverVolumeExpansionFailure` are both
728+
If the feature gates `RecoverVolumeExpansionFailure` is
650729
enabled in your cluster, and expansion has failed for a PVC, you can retry expansion with a
651730
smaller size than the previously requested value. To request a new expansion attempt with a
652731
smaller proposed size, edit `.spec.resources` for that PVC and choose a value that is less than the
@@ -655,8 +734,8 @@ This is useful if expansion to a higher value did not succeed because of capacit
655734
If that has happened, or you suspect that it might have, you can retry expansion by specifying a
656735
size that is within the capacity limits of underlying storage provider. You can monitor status of resize operation by watching `.status.resizeStatus` and events on the PVC.
657736
-->
658-
如果集群中的特性门控 `ExpandPersistentVolumes` 和 `RecoverVolumeExpansionFailure`
659-
都已启用,在 PVC 的扩展发生失败时,你可以使用比先前请求的值更小的尺寸来重试扩展。
737+
如果集群中的特性门控 `RecoverVolumeExpansionFailure`
738+
已启用,在 PVC 的扩展发生失败时,你可以使用比先前请求的值更小的尺寸来重试扩展。
660739
要使用一个更小的尺寸尝试请求新的扩展,请编辑该 PVC 的 `.spec.resources` 并选择
661740
一个比你之前所尝试的值更小的值。
662741
如果由于容量限制而无法成功扩展至更高的值,这将很有用。
@@ -1411,10 +1490,7 @@ spec:
14111490

14121491
## Volume populators and data sources
14131492

1414-
Kubernetes supports custom volume populators; this alpha feature was introduced
1415-
in Kubernetes 1.18. Kubernetes 1.22 reimplemented the mechanism with a redesigned API.
1416-
Check that you are reading the version of the Kubernetes documentation that matches your
1417-
cluster. {{% version-check %}}
1493+
Kubernetes supports custom volume populators.
14181494
To use custom volume populators, you must enable the `AnyVolumeDataSource`
14191495
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for
14201496
the kube-apiserver and kube-controller-manager.
@@ -1428,13 +1504,11 @@ gate enabled, use of the `dataSourceRef` is preferred over `dataSource`.
14281504

14291505
## 卷填充器(Populator)与数据源 {#volume-populators-and-data-sources}
14301506

1431-
{{< feature-state for_k8s_version="v1.22" state="alpha" >}}
1507+
{{< feature-state for_k8s_version="v1.24" state="beta" >}}
14321508

14331509
{{< note >}}
1434-
Kubernetes 支持自定义的卷填充器;Kubernetes 1.18 版本引入了这个 alpha 特性。
1435-
Kubernetes 1.22 使用重新设计的 API 重新实现了该机制。
1436-
确认你正在阅读与你的集群版本一致的 Kubernetes 文档。{{% version-check %}}
1437-
要使用自定义的卷填充器,你必须为 kube-apiserver 和 kube-controller-manager 启用 `AnyVolumeDataSource`
1510+
Kubernetes 支持自定义的卷填充器;要使用自定义的卷填充器,你必须为
1511+
kube-apiserver 和 kube-controller-manager 启用 `AnyVolumeDataSource`
14381512
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)。
14391513
{{< /note >}}
14401514

@@ -1630,7 +1704,7 @@ Volume snapshot feature was added to support CSI Volume Plugins only. For detail
16301704
To enable support for restoring a volume from a volume snapshot data source, enable the
16311705
`VolumeSnapshotDataSource` feature gate on the apiserver and controller-manager.
16321706
-->
1633-
卷快照(Volume Snapshot)功能的添加仅是为了支持 CSI 卷插件。
1707+
卷快照(Volume Snapshot)特性的添加仅是为了支持 CSI 卷插件。
16341708
有关细节可参阅[卷快照](/zh/docs/concepts/storage/volume-snapshots/)文档。
16351709

16361710
要启用从卷快照数据源恢复数据卷的支持,可在 API 服务器和控制器管理器上启用

0 commit comments

Comments
 (0)