@@ -103,7 +103,7 @@ Note that certain cloud providers may already define a default StorageClass.
103
103
104
104
当一个 PVC 没有指定 `storageClassName` 时,会使用默认的 StorageClass。
105
105
集群中只能有一个默认的 StorageClass。如果不小心设置了多个默认的 StorageClass,
106
- 当 PVC 动态配置时,将使用最新设置的默认 StorageClass。
106
+ 在动态制备 PVC 时将使用其中最新的默认设置的 StorageClass。
107
107
108
108
关于如何设置默认的 StorageClass,
109
109
请参见[更改默认 StorageClass](/zh-cn/docs/tasks/administer-cluster/change-default-storage-class/)。
@@ -130,7 +130,6 @@ for provisioning PVs. This field must be specified.
130
130
| CephFS | - | - |
131
131
| FC | - | - |
132
132
| FlexVolume | - | - |
133
- | GCEPersistentDisk | ✓ | [GCE PD](#gce-pd) |
134
133
| iSCSI | - | - |
135
134
| NFS | - | [NFS](#nfs) |
136
135
| RBD | ✓ | [Ceph RBD](#ceph-rbd) |
@@ -208,14 +207,16 @@ PersistentVolume 可以配置为可扩展。将此功能设置为 `true` 时,
208
207
209
208
当下层 StorageClass 的 `allowVolumeExpansion` 字段设置为 true 时,以下类型的卷支持卷扩展。
210
209
211
- {{< table caption = "Table of Volume types and the version of Kubernetes they require" >}}
210
+ <!--
211
+ " Table of Volume types and the version of Kubernetes they require"
212
+ -->
213
+ {{< table caption = "卷类型及其 Kubernetes 版本要求" >}}
212
214
213
215
<!--
214
216
Volume type | Required Kubernetes version
215
217
-->
216
218
| 卷类型 | Kubernetes 版本要求 |
217
219
| :------------------- | :------------------------ |
218
- | gcePersistentDisk | 1.11 |
219
220
| rbd | 1.11 |
220
221
| Azure File | 1.11 |
221
222
| Portworx | 1.11 |
@@ -292,24 +293,12 @@ PersistentVolume 会根据 Pod 调度约束指定的拓扑来选择或制备。
292
293
[Pod 亲和性和互斥性](/zh-cn/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity/)、
293
294
以及[污点和容忍度](/zh-cn/docs/concepts/scheduling-eviction/taint-and-toleration)。
294
295
295
- <!--
296
- The following plugins support `WaitForFirstConsumer` with dynamic provisioning :
297
-
298
- - [GCEPersistentDisk](#gce-pd)
299
- -->
300
- 以下插件支持动态制备的 `WaitForFirstConsumer` 模式:
301
-
302
- - [GCEPersistentDisk](#gce-pd)
303
-
304
296
<!--
305
297
The following plugins support `WaitForFirstConsumer` with pre-created PersistentVolume binding :
306
-
307
- - All of the above
308
298
- [Local](#local)
309
299
-->
310
300
以下插件支持预创建绑定 PersistentVolume 的 `WaitForFirstConsumer` 模式:
311
301
312
- - 上述全部
313
302
- [Local](#local)
314
303
315
304
{{< feature-state state="stable" for_k8s_version="v1.17" >}}
@@ -485,85 +474,6 @@ parameters:
485
474
` zone` 和 `zones` 已被弃用并被[允许的拓扑结构](#allowed-topologies)取代。
486
475
{{< /note >}}
487
476
488
- # ## GCE PD {#gce-pd}
489
-
490
- ` ` ` yaml
491
- apiVersion: storage.k8s.io/v1
492
- kind: StorageClass
493
- metadata:
494
- name: slow
495
- provisioner: kubernetes.io/gce-pd
496
- parameters:
497
- type: pd-standard
498
- fstype: ext4
499
- replication-type: none
500
- ` ` `
501
-
502
- <!--
503
- - `type` : ` pd-standard` or `pd-ssd`. Default: `pd-standard`
504
- - `zone` (Deprecated) : GCE zone. If neither `zone` nor `zones` is specified, volumes are
505
- generally round-robin-ed across all active zones where Kubernetes cluster has
506
- a node. `zone` and `zones` parameters must not be used at the same time.
507
- - `zones` (Deprecated) : A comma separated list of GCE zone(s). If neither `zone` nor `zones`
508
- is specified, volumes are generally round-robin-ed across all active zones
509
- where Kubernetes cluster has a node. `zone` and `zones` parameters must not
510
- be used at the same time.
511
- - `fstype` : ` ext4` or `xfs`. Default: `ext4`. The defined filesystem type must be supported by the host operating system.
512
-
513
- - `replication-type` : ` none` or `regional-pd`. Default: `none`.
514
- -->
515
- - ` type` :`pd-standard` 或者 `pd-ssd`。默认:`pd-standard`
516
- - ` zone` (已弃用):GCE 区域。如果没有指定 `zone` 和 `zones`,
517
- 通常卷会在 Kubernetes 集群节点所在的活动区域中轮询调度分配。
518
- ` zone` 和 `zones` 参数不能同时使用。
519
- - ` zones` (已弃用):逗号分隔的 GCE 区域列表。如果没有指定 `zone` 和 `zones`,
520
- 通常卷会在 Kubernetes 集群节点所在的活动区域中轮询调度(round-robin)分配。
521
- ` zone` 和 `zones` 参数不能同时使用。
522
- - ` fstype` :`ext4` 或 `xfs`。默认:`ext4`。宿主机操作系统必须支持所定义的文件系统类型。
523
- - ` replication-type` :`none` 或者 `regional-pd`。默认值:`none`。
524
-
525
- <!--
526
- If `replication-type` is set to `none`, a regular (zonal) PD will be provisioned.
527
- -->
528
- 如果 `replication-type` 设置为 `none`,会制备一个常规(当前区域内的)持久化磁盘。
529
-
530
- <!--
531
- If `replication-type` is set to `regional-pd`, a
532
- [Regional Persistent Disk](https://cloud.google.com/compute/docs/disks/#repds)
533
- will be provisioned. It's highly recommended to have
534
- `volumeBindingMode : WaitForFirstConsumer` set, in which case when you create
535
- a Pod that consumes a PersistentVolumeClaim which uses this StorageClass, a
536
- Regional Persistent Disk is provisioned with two zones. One zone is the same
537
- as the zone that the Pod is scheduled in. The other zone is randomly picked
538
- from the zones available to the cluster. Disk zones can be further constrained
539
- using `allowedTopologies`.
540
- -->
541
- 如果 `replication-type` 设置为 `regional-pd`,
542
- 会制备一个[区域性持久化磁盘(Regional Persistent Disk)](https://cloud.google.com/compute/docs/disks/#repds)。
543
-
544
- 强烈建议设置 `volumeBindingMode : WaitForFirstConsumer`,这样设置后,
545
- 当你创建一个 Pod,它使用的 PersistentVolumeClaim 使用了这个 StorageClass,
546
- 区域性持久化磁盘会在两个区域里制备。其中一个区域是 Pod 所在区域,
547
- 另一个区域是会在集群管理的区域中任意选择,磁盘区域可以通过 `allowedTopologies` 加以限制。
548
-
549
- {{< note >}}
550
- <!--
551
- ` zone` and `zones` parameters are deprecated and replaced with
552
- [allowedTopologies](#allowed-topologies). When
553
- [GCE CSI Migration](/docs/concepts/storage/volumes/#gce-csi-migration) is
554
- enabled, a GCE PD volume can be provisioned in a topology that does not match
555
- any nodes, but any pod trying to use that volume will fail to schedule. With
556
- legacy pre-migration GCE PD, in this case an error will be produced
557
- instead at provisioning time. GCE CSI Migration is enabled by default beginning
558
- from the Kubernetes 1.23 release.
559
- -->
560
- ` zone` 和 `zones` 已被弃用并被 [allowedTopologies](#allowed-topologies) 取代。
561
- 当启用 [GCE CSI 迁移](/zh-cn/docs/concepts/storage/volumes/#gce-csi-migration)时,
562
- GCE PD 卷可能被制备在某个与所有节点都不匹配的拓扑域中,但任何尝试使用该卷的 Pod 都无法被调度。
563
- 对于传统的迁移前 GCE PD,这种情况下将在制备卷的时候产生错误。
564
- 从 Kubernetes 1.23 版本开始,GCE CSI 迁移默认启用。
565
- {{< /note >}}
566
-
567
477
# ## NFS {#nfs}
568
478
569
479
` ` ` yaml
0 commit comments