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

ref https://github.com/k8smeetup/website-tasks/issues/3502
This commit is contained in:
Dominic Yin
2020-04-08 11:28:55 +08:00
parent 2595ff7221
commit 1b70be972c
@@ -87,38 +87,38 @@ volumeBindingMode: Immediate
<!-- <!--
### Provisioner ### Provisioner
Storage classes have a provisioner that determines what volume plugin is used Each Storage classe has a provisioner that determines what volume plugin is used
for provisioning PVs. This field must be specified. for provisioning PVs. This field must be specified.
--> -->
### 存储分配器 ### 存储分配器
`StorageClass` 有一个分配器,用来决定使用哪个`卷插件`分配`PV`。该字段必须指定。 每个 `StorageClass` 有一个分配器,用来决定使用哪个`卷插件`分配 `PV`。该字段必须指定。
<!-- <!--
| Volume Plugin | Internal Provisioner| Config Example | | Volume Plugin | Internal Provisioner| Config Example |
--> -->
| 卷插件 | 内置分配器 | 配置例子 | | 卷插件 | 内置分配器 | 配置例子 |
| :--- | :---: | :---: | |:---------------------|:----------:|:-------------------------------------:|
| AWSElasticBlockStore | &#x2713; | [AWS EBS](#aws-ebs) | | AWSElasticBlockStore | &#x2713; | [AWS EBS](#aws-ebs) |
| AzureFile | &#x2713; | [Azure File](#azure-file) | | AzureFile | &#x2713; | [Azure File](#azure-file) |
| AzureDisk | &#x2713; | [Azure Disk](#azure-disk) | | AzureDisk | &#x2713; | [Azure Disk](#azure-disk) |
| CephFS | - | - | | CephFS | - | - |
| Cinder | &#x2713; | [OpenStack Cinder](#openstack-cinder)| | Cinder | &#x2713; | [OpenStack Cinder](#openstack-cinder) |
| FC | - | - | | FC | - | - |
| FlexVolume | - | - | | FlexVolume | - | - |
| Flocker | &#x2713; | - | | Flocker | &#x2713; | - |
| GCEPersistentDisk | &#x2713; | [GCE PD](#gce-pd) | | GCEPersistentDisk | &#x2713; | [GCE PD](#gce-pd) |
| Glusterfs | &#x2713; | [Glusterfs](#glusterfs) | | Glusterfs | &#x2713; | [Glusterfs](#glusterfs) |
| iSCSI | - | - | | iSCSI | - | - |
| Quobyte | &#x2713; | [Quobyte](#quobyte) | | Quobyte | &#x2713; | [Quobyte](#quobyte) |
| NFS | - | - | | NFS | - | - |
| RBD | &#x2713; | [Ceph RBD](#ceph-rbd) | | RBD | &#x2713; | [Ceph RBD](#ceph-rbd) |
| VsphereVolume | &#x2713; | [vSphere](#vsphere) | | VsphereVolume | &#x2713; | [vSphere](#vsphere) |
| PortworxVolume | &#x2713; | [Portworx Volume](#portworx-volume) | | PortworxVolume | &#x2713; | [Portworx Volume](#portworx-volume) |
| ScaleIO | &#x2713; | [ScaleIO](#scaleio) | | ScaleIO | &#x2713; | [ScaleIO](#scaleio) |
| StorageOS | &#x2713; | [StorageOS](#storageos) | | StorageOS | &#x2713; | [StorageOS](#storageos) |
| Local | - | [Local](#local) | | Local | - | [Local](#local) |
<!-- <!--
You are not restricted to specifying the "internal" provisioners You are not restricted to specifying the "internal" provisioners
@@ -187,24 +187,31 @@ Storage Class has the field `allowVolumeExpansion` set to true.
当基础存储类的 `allowVolumeExpansion` 字段设置为true时,以下类型的卷支持卷扩展。 当基础存储类的 `allowVolumeExpansion` 字段设置为true时,以下类型的卷支持卷扩展。
* gcePersistentDisk {{< table caption = "Table of Volume types and the version of Kubernetes they require" >}}
* awsElasticBlockStore
* Cinder <!--
* glusterfs Volume type | Required Kubernetes version
* rbd -->
* Azure File | 卷类型 | Kubernetes 版本要求 |
* Azure Disk |:---------------------|:--------------------------|
* Portworx | gcePersistentDisk | 1.11 |
* FlexVolumes | awsElasticBlockStore | 1.11 |
* CSI {{< feature-state for_k8s_version="v1.14" state="alpha" >}} | Cinder | 1.11 |
| glusterfs | 1.11 |
| rbd | 1.11 |
| Azure File | 1.11 |
| Azure Disk | 1.11 |
| Portworx | 1.11 |
| FlexVolume | 1.13 |
| CSI | 1.14 (alpha), 1.16 (beta) |
{{< /table >}}
{{< note >}} {{< note >}}
<!-- <!--
This feature cannot be used to shrink volumes. You can only use the volume expansion feature to grow a Volume, not to shrink it.
--> -->
此功能不能用于缩小卷。 此功能仅可用于扩容卷,不能用于缩小卷。
{{< /note >}} {{< /note >}}
<!-- <!--
@@ -229,14 +236,6 @@ the class or PV, so mount of the PV will simply fail if one is invalid.
--> -->
### 卷绑定模式 ### 卷绑定模式
{{< feature-state for_k8s_version="v1.12" state="beta" >}}
<!--
**Note:** This feature requires the `VolumeScheduling` feature gate to be
enabled.
-->
**注意:** 这个功能特性需要启用 `VolumeScheduling` 参数才能使用。
<!-- <!--
The `volumeBindingMode` field controls when [volume binding and dynamic The `volumeBindingMode` field controls when [volume binding and dynamic
provisioning](/docs/concepts/storage/persistent-volumes/#provisioning) should occur. provisioning](/docs/concepts/storage/persistent-volumes/#provisioning) should occur.
@@ -296,16 +295,16 @@ The following plugins support `WaitForFirstConsumer` with pre-created Persistent
* All of the above * All of the above
* [Local](#local) * [Local](#local)
{{< feature-state state="beta" for_k8s_version="1.14" >}} {{< feature-state state="beta" for_k8s_version="1.17" >}}
<!-- <!--
[CSI volumes](/docs/concepts/storage/volumes/#csi) are also supported with dynamic provisioning [CSI volumes](/docs/concepts/storage/volumes/#csi) are also supported with dynamic provisioning
and pre-created PVs, but you'll need to look at the documentation for a specific CSI driver and pre-created PVs, but you'll need to look at the documentation for a specific CSI driver
to see its supported topology keys and examples. The `CSINodeInfo` feature gate must be enabled. to see its supported topology keys and examples.
--> -->
动态配置和预先创建的PVs也支持 [CSI卷](/docs/concepts/storage/volumes/#csi) 动态配置和预先创建的PVs也支持 [CSI卷](/docs/concepts/storage/volumes/#csi)
但是您需要查看特定CSI驱动程序的文档以查看其支持的拓扑密钥和例子。 必须启用 `CSINodeInfo` 特性。 但是您需要查看特定CSI驱动程序的文档以查看其支持的拓扑密钥和例子。
<!-- <!--
### Allowed Topologies ### Allowed Topologies
@@ -313,11 +312,6 @@ to see its supported topology keys and examples. The `CSINodeInfo` feature gate
### 允许的拓扑结构 ### 允许的拓扑结构
{{< feature-state for_k8s_version="v1.12" state="beta" >}} {{< feature-state for_k8s_version="v1.12" state="beta" >}}
<!--
**Note:** This feature requires the `VolumeScheduling` feature gate to be enabled.
-->
**注意:** 这个特性需要开启 `VolumeScheduling` 特性开关。
<!-- <!--
When a cluster operator specifies the `WaitForFirstConsumer` volume binding mode, it is no longer necessary When a cluster operator specifies the `WaitForFirstConsumer` volume binding mode, it is no longer necessary
to restrict provisioning to specific topologies in most situations. However, to restrict provisioning to specific topologies in most situations. However,
@@ -358,12 +352,18 @@ class. Different parameters may be accepted depending on the `provisioner`. For
example, the value `io1`, for the parameter `type`, and the parameter example, the value `io1`, for the parameter `type`, and the parameter
`iopsPerGB` are specific to EBS. When a parameter is omitted, some default is `iopsPerGB` are specific to EBS. When a parameter is omitted, some default is
used. used.
There can be at most 512 parameters defined for a StorageClass.
The total length of the parameters object including its keys and values cannot
exceed 256 KiB.
--> -->
## 参数 ## 参数
Storage class 具有描述属于卷的参数。取决于分配器,可以接受不同的参数。 Storage class 具有描述属于卷的参数。取决于分配器,可以接受不同的参数。
例如,参数 type 的值 io1 和参数 iopsPerGB 特定于 EBS PV。当参数被省略时,会使用默认值。 例如,参数 type 的值 io1 和参数 iopsPerGB 特定于 EBS PV。当参数被省略时,会使用默认值。
一个 StorageClass 最多可以定义 512 个参数。这些参数对象的总长度不能超过 256 KiB, 包括参数的键和值。
### AWS EBS ### AWS EBS
```yaml ```yaml
@@ -441,11 +441,13 @@ parameters:
is specified, volumes are generally round-robin-ed across all active zones is specified, volumes are generally round-robin-ed across all active zones
where Kubernetes cluster has a node. `zone` and `zones` parameters must not where Kubernetes cluster has a node. `zone` and `zones` parameters must not
be used at the same time. be used at the same time.
* `fstype`: `ext4` or `xfs`. Default: `ext4`. The defined filesystem type must be supported by the host operating system.
* `replication-type`: `none` or `regional-pd`. Default: `none`. * `replication-type`: `none` or `regional-pd`. Default: `none`.
--> -->
* `type``pd-standard` 或者 `pd-ssd`。默认:`pd-standard` * `type``pd-standard` 或者 `pd-ssd`。默认:`pd-standard`
* `zone`(弃用)GCE 区域。如果没有指定 `zone``zones`,通常卷会在 Kubernetes 集群节点所在的活动区域中轮询调度分配。`zone``zones` 参数不能同时使用。 * `zone`(弃用)GCE 区域。如果没有指定 `zone``zones`,通常卷会在 Kubernetes 集群节点所在的活动区域中轮询调度分配。`zone``zones` 参数不能同时使用。
* `zones`(弃用):逗号分隔的 GCE 区域列表。如果没有指定 `zone``zones`,通常卷会在 Kubernetes 集群节点所在的活动区域中轮询调度(round-robin)分配。`zone``zones` 参数不能同时使用。 * `zones`(弃用):逗号分隔的 GCE 区域列表。如果没有指定 `zone``zones`,通常卷会在 Kubernetes 集群节点所在的活动区域中轮询调度(round-robin)分配。`zone``zones` 参数不能同时使用。
* `fstype`: `ext4``xfs`。 默认: `ext4`。宿主机操作系统必须支持所定义的文件系统类型。
* `replication-type``none` 或者 `regional-pd`。默认值:`none` * `replication-type``none` 或者 `regional-pd`。默认值:`none`
<!-- <!--
@@ -892,9 +894,9 @@ parameters:
### Azure 磁盘 ### Azure 磁盘
<!-- <!--
#### Azure Unmanaged Disk Storage Class #### Azure Unmanaged Disk Storage Class {#azure-disk-storage-class}
--> -->
#### Azure Unmanaged Disk Storage Class(非托管磁盘存储类) #### Azure Unmanaged Disk Storage Class(非托管磁盘存储类){#azure-unmanaged-disk-storage-class}
```yaml ```yaml
kind: StorageClass kind: StorageClass
@@ -921,9 +923,9 @@ parameters:
* `storageAccount`:Azure 存储帐户名称。如果提供存储帐户,它必须位于与集群相同的资源组中,并且 `location` 是被忽略的。如果未提供存储帐户,则会在与群集相同的资源组中创建新的存储帐户。 * `storageAccount`:Azure 存储帐户名称。如果提供存储帐户,它必须位于与集群相同的资源组中,并且 `location` 是被忽略的。如果未提供存储帐户,则会在与群集相同的资源组中创建新的存储帐户。
<!-- <!--
#### New Azure Disk Storage Class (starting from v1.7.2) #### New Azure Disk Storage Class (starting from v1.7.2) {#azure-disk-storage-class}
--> -->
#### 新的 Azure 磁盘 Storage Class(从 v1.7.2 开始) #### 新的 Azure 磁盘 Storage Class(从 v1.7.2 开始){#azure-disk-storage-class}
```yaml ```yaml
kind: StorageClass kind: StorageClass