Skip to content

Commit 137773f

Browse files
committed
[zh-cn]sync persistent-volumes volume-attributes-classes
Signed-off-by: xin.li <[email protected]>
1 parent 06ce4cb commit 137773f

File tree

2 files changed

+38
-63
lines changed

2 files changed

+38
-63
lines changed

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

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ This document describes _persistent volumes_ in Kubernetes. Familiarity with
4141
and [VolumeAttributesClasses](/docs/concepts/storage/volume-attributes-classes/) is suggested.
4242
-->
4343
本文描述 Kubernetes 中的**持久卷(Persistent Volumes)**
44-
建议先熟悉[卷(volume](/zh-cn/docs/concepts/storage/volumes/)
44+
建议先熟悉[卷(Volume](/zh-cn/docs/concepts/storage/volumes/)
4545
[存储类(StorageClass)](/zh-cn/docs/concepts/storage/storage-classes/)
4646
[卷属性类(VolumeAttributesClass)](/zh-cn/docs/concepts/storage/volume-attributes-classes/)
4747

@@ -565,7 +565,7 @@ in the cluster. However, if you want a PVC to bind to a specific PV, you need to
565565
-->
566566
### 预留 PersistentVolume {#reserving-a-persistentvolume}
567567

568-
控制平面可以在集群中[将 PersistentVolumeClaims 绑定到匹配的 PersistentVolumes](#binding)。
568+
控制平面可以在集群中[将 PersistentVolumeClaim 绑定到匹配的 PersistentVolume](#binding)。
569569
但是,如果你希望 PVC 绑定到特定 PV,则需要预先绑定它们。
570570

571571
<!--
@@ -642,7 +642,7 @@ This is useful if you want to consume PersistentVolumes that have their `persist
642642
to `Retain`, including cases where you are reusing an existing PV.
643643
-->
644644
如果你想要使用 `persistentVolumeReclaimPolicy` 属性设置为 `Retain` 的 PersistentVolume 卷时,
645-
包括你希望复用现有的 PV 卷时,这点是很有用的
645+
包括你希望复用现有的 PV 卷时,这点是很有用的
646646

647647
<!--
648648
### Expanding Persistent Volumes Claims
@@ -670,7 +670,7 @@ volme types)
670670
<!--
671671
You can only expand a PVC if its storage class's `allowVolumeExpansion` field is set to true.
672672
-->
673-
只有当 PVC 的存储类中将 `allowVolumeExpansion` 设置为 true 时,你才可以扩充该 PVC 申领
673+
只有当 PVC 的存储类中将 `allowVolumeExpansion` 设置为 true 时,你才可以扩充该 PVC。
674674

675675
```yaml
676676
apiVersion: storage.k8s.io/v1
@@ -797,7 +797,14 @@ Kubernetes provides following methods of recovering from such failures.
797797
直到用户或集群管理员采取一些措施。这种情况是不希望发生的,因此 Kubernetes
798798
提供了以下从此类故障中恢复的方法。
799799

800-
{{< tabs name="recovery_methods" >}}
800+
<!--
801+
tabs name="recovery_methods"
802+
-->
803+
{{< tabs name="恢复方法" >}}
804+
805+
<!--
806+
tab name="Manually with Cluster Administrator access"
807+
-->
801808
{{% tab name="集群管理员手动处理" %}}
802809

803810
<!--
@@ -830,24 +837,14 @@ administrator intervention.
830837
5. 不要忘记恢复 PV 卷上设置的回收策略。
831838

832839
{{% /tab %}}
833-
{{% tab name="通过请求扩展为更小尺寸" %}}
834-
{{< feature-state feature_gate_name="RecoverVolumeExpansionFailure" >}}
835840

836-
{{< note >}}
837841
<!--
838-
Recovery from failing PVC expansion by users (`RecoverVolumeExpansionFailure`) is available as an beta feature
839-
since Kubernetes 1.32 and should be enabled by default. Refer to the
840-
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
841-
documentation for more information.
842+
tab name="By requesting expansion to smaller size"
842843
-->
843-
Kubernetes 从 1.32 版本开始将允许用户恢复失败的 PVC 扩展(`RecoverVolumeExpansionFailure`),
844-
这一特性目前为 Beta 阶段。
845-
可参考[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
846-
文档了解更多信息。
847-
{{< /note >}}
844+
{{% tab name="通过请求扩展为更小尺寸" %}}
848845

849846
<!--
850-
When using `RecoverVolumeExpansionFailure` feature, if expansion has failed for a PVC, you can retry expansion with a
847+
If expansion has failed for a PVC, you can retry expansion with a
851848
smaller size than the previously requested value. To request a new expansion attempt with a
852849
smaller proposed size, edit `.spec.resources` for that PVC and choose a value that is less than the
853850
value you previously tried.
@@ -856,8 +853,7 @@ If that has happened, or you suspect that it might have, you can retry expansion
856853
size that is within the capacity limits of underlying storage provider. You can monitor status of
857854
resize operation by watching `.status.allocatedResourceStatuses` and events on the PVC.
858855
-->
859-
使用 `RecoverVolumeExpansionFailure` 特性时,如果 PVC 扩展失败,
860-
你可以使用比先前请求的值更小的尺寸来重试扩展。
856+
如果 PVC 扩展失败,你可以使用比先前请求值更小的值来重试扩展。
861857
要使用一个更小的尺寸尝试请求新的扩展,请编辑该 PVC 的 `.spec.resources`
862858
并选择一个比你之前所尝试的值更小的值。
863859
如果由于容量限制而无法成功扩展至更高的值,这将很有用。
@@ -871,9 +867,8 @@ although you can specify a lower amount of storage than what was requested previ
871867
the new value must still be higher than `.status.capacity`.
872868
Kubernetes does not support shrinking a PVC to less than its current size.
873869
-->
874-
请注意,
875-
尽管你可以指定比之前的请求更低的存储量,新值必须仍然高于 `.status.capacity`。
876-
Kubernetes 不支持将 PVC 缩小到小于其当前的尺寸。
870+
请注意,尽管你可以指定比之前的请求更低的存储量,新值必须仍然高于
871+
`.status.capacity`。Kubernetes 不支持将 PVC 缩容到小于其当前值。
877872

878873
{{% /tab %}}
879874
{{% /tabs %}}
@@ -1158,10 +1153,6 @@ The `ReadWriteOncePod` access mode is only supported for
11581153
1.22+. To use this feature you will need to update the following
11591154
[CSI sidecars](https://kubernetes-csi.github.io/docs/sidecar-containers.html)
11601155
to these versions or greater:
1161-
1162-
* [csi-provisioner:v3.0.0+](https://github.com/kubernetes-csi/external-provisioner/releases/tag/v3.0.0)
1163-
* [csi-attacher:v3.3.0+](https://github.com/kubernetes-csi/external-attacher/releases/tag/v3.3.0)
1164-
* [csi-resizer:v1.3.0+](https://github.com/kubernetes-csi/external-resizer/releases/tag/v1.3.0)
11651156
-->
11661157
`ReadWriteOncePod` 访问模式仅适用于 {{< glossary_tooltip text="CSI" term_id="csi" >}}
11671158
卷和 Kubernetes v1.22+。要使用此特性,你需要将以下
@@ -1174,11 +1165,6 @@ to these versions or greater:
11741165

11751166
<!--
11761167
In the CLI, the access modes are abbreviated to:
1177-
1178-
* RWO - ReadWriteOnce
1179-
* ROX - ReadOnlyMany
1180-
* RWX - ReadWriteMany
1181-
* RWOP - ReadWriteOncePod
11821168
-->
11831169
在命令行接口(CLI)中,访问模式也使用以下缩写形式:
11841170

@@ -1257,7 +1243,7 @@ to PVCs that request no particular class.
12571243
每个 PV 可以属于某个类(Class),通过将其 `storageClassName` 属性设置为某个
12581244
[StorageClass](/zh-cn/docs/concepts/storage/storage-classes/) 的名称来指定。
12591245
特定类的 PV 卷只能绑定到请求该类存储卷的 PVC 申领。
1260-
未设置 `storageClassName` 的 PV 卷没有类设定,只能绑定到那些没有指定特定存储类的 PVC 申领
1246+
未设置 `storageClassName` 的 PV 卷没有类设定,只能绑定到那些没有指定特定存储类的 PVC
12611247

12621248
<!--
12631249
In the past, the annotation `volume.beta.kubernetes.io/storage-class` was used instead
@@ -1419,7 +1405,7 @@ the current time.
14191405
该字段保存的是卷上次转换阶段的时间戳。
14201406
对于新创建的卷,阶段被设置为 `Pending`,`lastPhaseTransitionTime` 被设置为当前时间。
14211407

1422-
## PersistentVolumeClaims
1408+
## PersistentVolumeClaim
14231409

14241410
<!--
14251411
Each PVC contains a spec and status, which is the specification and status of the claim.

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

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -32,37 +32,12 @@ A VolumeAttributesClass provides a way for administrators to describe the mutabl
3232
"classes" of storage they offer. Different classes might map to different quality-of-service levels.
3333
Kubernetes itself is un-opinionated about what these classes represent.
3434
35-
This is a beta feature and disabled by default.
36-
37-
If you want to test the feature whilst it's beta, you need to enable the `VolumeAttributesClass`
38-
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for the kube-controller-manager, kube-scheduler,
39-
and the kube-apiserver. You use the `--feature-gates` command line argument:
35+
This feature is generally available (GA) as of version 1.34, and users have the option to disable it.
4036
-->
4137
卷属性类(VolumeAttributesClass)为管理员提供了一种描述可变更的存储“类”的方法。
4238
不同的类可以映射到不同的服务质量级别。Kubernetes 本身不关注这些类代表什么。
4339

44-
这是一个 Beta 特性,默认被禁用。
45-
46-
如果你想测试这一处于 Beta 阶段的特性,你需要为 kube-controller-manager、kube-scheduler 和 kube-apiserver 启用
47-
`VolumeAttributesClass` [特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
48-
你可以使用 `--feature-gates` 命令行参数:
49-
50-
```shell
51-
--feature-gates="...,VolumeAttributesClass=true"
52-
```
53-
54-
<!--
55-
You will also have to enable the `storage.k8s.io/v1beta1` API group through the
56-
`kube-apiserver` [runtime-config](https://kubernetes.io/docs/tasks/administer-cluster/enable-disable-api/).
57-
You use the following command line argument:
58-
-->
59-
你还必须通过 `kube-apiserver`
60-
[运行时配置](/zh-cn/docs/tasks/administer-cluster/enable-disable-api/)启用
61-
`storage.k8s.io/v1beta1` API 组:
62-
63-
```shell
64-
--runtime-config=storage.k8s.io/v1beta1=true
65-
```
40+
此特性从 Kubernetes 1.34 版本开始一般可用(GA),用户可以选择禁用它。
6641

6742
<!--
6843
You can also only use VolumeAttributesClasses with storage backed by
@@ -94,7 +69,7 @@ VolumeAttributesClass 对象的名称比较重要,用户用对象名称来请
9469
但现有类中的参数是不可变的。
9570

9671
```yaml
97-
apiVersion: storage.k8s.io/v1beta1
72+
apiVersion: storage.k8s.io/v1
9873
kind: VolumeAttributesClass
9974
metadata:
10075
name: silver
@@ -132,6 +107,13 @@ the provisioner is shipped, how it needs to be run, what volume plugin it uses,
132107
你也可以运行并指定外部制备器,它们是遵循 Kubernetes 所定义的规范的独立程序。
133108
外部制备器的作者可以完全自行决定他们的代码放在哪儿、如何交付制备器、以何种方式运行、使用什么卷插件等。
134109

110+
<!--
111+
To understand how the provisioner works with VolumeAttributesClass, refer to
112+
the [CSI external-provisioner documentation](https://kubernetes-csi.github.io/docs/external-provisioner.html).
113+
-->
114+
要了解制备组件如何使用 VolumeAttributesClass,请参阅
115+
[CSI 外部制备器文档](https://kubernetes-csi.github.io/docs/external-provisioner.html)。
116+
135117
<!--
136118
### Resizer
137119

@@ -170,7 +152,7 @@ A new VolumeAttributesClass gold is available in the cluster:
170152
集群中有一个新的名为 gold 的 VolumeAttributesClass:
171153

172154
```yaml
173-
apiVersion: storage.k8s.io/v1beta1
155+
apiVersion: storage.k8s.io/v1
174156
kind: VolumeAttributesClass
175157
metadata:
176158
name: gold
@@ -196,6 +178,13 @@ spec:
196178
197179
```
198180

181+
<!--
182+
To understand how the resizer works with VolumeAttributesClass, refer to
183+
the [CSI external-resizer documentation](https://kubernetes-csi.github.io/docs/external-resizer.html).
184+
-->
185+
要了解扩缩容组件如何使用 VolumeAttributesClass,请参阅
186+
[CSI 外部扩缩容组件文档](https://kubernetes-csi.github.io/docs/external-resizer.html)。
187+
199188
<!--
200189
## Parameters
201190

0 commit comments

Comments
 (0)