Skip to content

Commit ad2d497

Browse files
committed
[zh-cn] resync1.25 /storage/storage-classes.md
1 parent 28b1854 commit ad2d497

File tree

1 file changed

+4
-249
lines changed

1 file changed

+4
-249
lines changed

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

Lines changed: 4 additions & 249 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: 存储类
33
content_type: concept
44
weight: 30
55
---
6-
76
<!--
87
reviewers:
98
- jsafrane
@@ -113,17 +112,13 @@ for provisioning PVs. This field must be specified.
113112
| Cinder | &#x2713; | [OpenStack Cinder](#openstack-cinder) |
114113
| FC | - | - |
115114
| FlexVolume | - | - |
116-
| Flocker | &#x2713; | - |
117115
| GCEPersistentDisk | &#x2713; | [GCE PD](#gce-pd) |
118116
| Glusterfs | &#x2713; | [Glusterfs](#glusterfs) |
119117
| iSCSI | - | - |
120-
| Quobyte | &#x2713; | [Quobyte](#quobyte) |
121118
| NFS | - | [NFS](#nfs) |
122119
| RBD | &#x2713; | [Ceph RBD](#ceph-rbd) |
123120
| VsphereVolume | &#x2713; | [vSphere](#vsphere) |
124121
| PortworxVolume | &#x2713; | [Portworx Volume](#portworx-卷) |
125-
| ScaleIO | &#x2713; | [ScaleIO](#scaleio) |
126-
| StorageOS | &#x2713; | [StorageOS](#storageos) |
127122
| Local | - | [Local](#本地) |
128123
129124
<!--
@@ -355,8 +350,6 @@ spec:
355350
-->
356351
### 允许的拓扑结构 {#allowed-topologies}
357352

358-
{{< feature-state for_k8s_version="v1.12" state="beta" >}}
359-
360353
<!--
361354
When a cluster operator specifies the `WaitForFirstConsumer` volume binding mode, it is no longer necessary
362355
to restrict provisioning to specific topologies in most situations. However,
@@ -477,7 +470,7 @@ parameters:
477470
`zone` 和 `zones` 已被弃用并被 [允许的拓扑结构](#allowed-topologies) 取代。
478471
{{< /note >}}
479472

480-
### GCE PD
473+
### GCE PD {#gce-pd}
481474

482475
```yaml
483476
apiVersion: storage.k8s.io/v1
@@ -681,7 +674,7 @@ parameters:
681674
当动态制备持久卷时,Gluster 插件自动创建名为 `gluster-dynamic-<claimname>`
682675
的端点和无头服务。在 PVC 被删除时动态端点和无头服务会自动被删除。
683676
684-
### NFS
677+
### NFS {#nfs}
685678
686679
```yaml
687680
apiVersion: storage.k8s.io/v1
@@ -742,7 +735,7 @@ OpenStack 的内部驱动已经被弃用。请使用
742735
[OpenStack 的外部云驱动](https://github.com/kubernetes/cloud-provider-openstack)。
743736
{{< /note >}}
744737

745-
### vSphere
738+
### vSphere {#vsphere}
746739

747740
<!--
748741
There are two types of provisioners for vSphere storage classes:
@@ -896,7 +889,7 @@ which you try out for persistent volume management inside Kubernetes for vSphere
896889
有几个 [vSphere 例子](https://github.com/kubernetes/examples/tree/master/staging/volumes/vsphere)供你在
897890
Kubernetes for vSphere 中尝试进行持久卷管理。
898891

899-
### Ceph RBD
892+
### Ceph RBD {#ceph-rbd}
900893

901894
```yaml
902895
apiVersion: storage.k8s.io/v1
@@ -942,12 +935,6 @@ parameters:
942935
must exist in the same namespace as PVCs. This parameter is required.
943936
The provided secret must have type "kubernetes.io/rbd", e.g. created in this
944937
way:
945-
946-
```shell
947-
kubectl create secret generic ceph-secret --type="kubernetes.io/rbd" \
948-
--from-literal=key='QVFEQ1pMdFhPUnQrSmhBQUFYaERWNHJsZ3BsMmNjcDR6RFZST0E9PQ==' \
949-
--namespace=kube-system
950-
```
951938
-->
952939
* `userSecretName`:用于映射 RBD 镜像的 `userId` 的 Ceph Secret 的名字。
953940
它必须与 PVC 存在于相同的 namespace 中。该参数是必需的。
@@ -973,95 +960,6 @@ parameters:
973960
* `imageFeatures`:这个参数是可选的,只能在你将 `imageFormat` 设置为 "2" 才使用。
974961
目前支持的功能只是 `layering`。默认是 "",没有功能打开。
975962

976-
### Quobyte
977-
978-
{{< feature-state for_k8s_version="v1.22" state="deprecated" >}}
979-
980-
<!--
981-
The Quobyte in-tree storage plugin is deprecated, an
982-
[example](https://github.com/quobyte/quobyte-csi/blob/master/example/StorageClass.yaml)
983-
`StorageClass` for the out-of-tree Quobyte plugin can be found at the Quobyte CSI repository.
984-
-->
985-
Quobyte 树内(in-tree)存储插件已弃用,
986-
你可以在 Quobyte CSI 仓库中找到用于树外(out-of-tree)Quobyte 插件的 `StorageClass`
987-
[示例](https://github.com/quobyte/quobyte-csi/blob/master/example/StorageClass.yaml)。
988-
989-
```yaml
990-
apiVersion: storage.k8s.io/v1
991-
kind: StorageClass
992-
metadata:
993-
name: slow
994-
provisioner: kubernetes.io/quobyte
995-
parameters:
996-
quobyteAPIServer: "http://138.68.74.142:7860"
997-
registry: "138.68.74.142:7861"
998-
adminSecretName: "quobyte-admin-secret"
999-
adminSecretNamespace: "kube-system"
1000-
user: "root"
1001-
group: "root"
1002-
quobyteConfig: "BASE"
1003-
quobyteTenant: "DEFAULT"
1004-
```
1005-
1006-
<!--
1007-
* `quobyteAPIServer`: API Server of Quobyte in the format
1008-
`"http(s)://api-server:7860"`
1009-
* `registry`: Quobyte registry to use to mount the volume. You can specify the
1010-
registry as ``<host>:<port>`` pair or if you want to specify multiple
1011-
registries, put a comma between them.
1012-
``<host1>:<port>,<host2>:<port>,<host3>:<port>``.
1013-
The host can be an IP address or if you have a working DNS you can also
1014-
provide the DNS names.
1015-
* `adminSecretNamespace`: The namespace for `adminSecretName`.
1016-
Default is "default".
1017-
-->
1018-
* `quobyteAPIServer`:Quobyte API 服务器的格式是 `"http(s)://api-server:7860"`
1019-
* `registry`:用于挂载卷的 Quobyte 仓库。你可以指定仓库为 `<host>:<port>`
1020-
或者如果你想指定多个 registry,在它们之间添加逗号,例如
1021-
`<host1>:<port>,<host2>:<port>,<host3>:<port>`
1022-
主机可以是一个 IP 地址,或者如果你有正在运行的 DNS,你也可以提供 DNS 名称。
1023-
* `adminSecretNamespace`:`adminSecretName` 的名字空间。
1024-
默认值是 "default"。
1025-
1026-
<!--
1027-
* `adminSecretName`: secret that holds information about the Quobyte user and
1028-
the password to authenticate against the API server. The provided secret
1029-
must have type "kubernetes.io/quobyte" and the keys `user` and `password`,
1030-
for example:
1031-
1032-
```shell
1033-
kubectl create secret generic quobyte-admin-secret \
1034-
--type="kubernetes.io/quobyte" --from-literal=user='admin' --from-literal=password='opensesame' \
1035-
--namespace=kube-system
1036-
```
1037-
-->
1038-
1039-
* `adminSecretName`:保存关于 Quobyte 用户和密码的 Secret,用于对 API 服务器进行身份验证。
1040-
提供的 secret 必须有值为 "kubernetes.io/quobyte" 的 type 参数和 `user`
1041-
与 `password` 的键值,例如:
1042-
1043-
```shell
1044-
kubectl create secret generic quobyte-admin-secret \
1045-
--type="kubernetes.io/quobyte" --from-literal=user='admin' --from-literal=password='opensesame' \
1046-
--namespace=kube-system
1047-
```
1048-
<!--
1049-
* `user`: maps all access to this user. Default is "root".
1050-
* `group`: maps all access to this group. Default is "nfsnobody".
1051-
* `quobyteConfig`: use the specified configuration to create the volume. You
1052-
can create a new configuration or modify an existing one with the Web
1053-
console or the quobyte CLI. Default is "BASE".
1054-
* `quobyteTenant`: use the specified tenant ID to create/delete the volume.
1055-
This Quobyte tenant has to be already present in Quobyte.
1056-
Default is "DEFAULT".
1057-
-->
1058-
* `user`:对这个用户映射的所有访问权限。默认是 "root"。
1059-
* `group`:对这个组映射的所有访问权限。默认是 "nfsnobody"。
1060-
* `quobyteConfig`:使用指定的配置来创建卷。你可以创建一个新的配置,
1061-
或者,可以修改 Web 控制台或 quobyte CLI 中现有的配置。默认是 "BASE"。
1062-
* `quobyteTenant`:使用指定的租户 ID 创建/删除卷。这个 Quobyte 租户必须已经于 Quobyte 中存在。
1063-
默认是 "DEFAULT"。
1064-
1065963
<!--
1066964
### Azure Disk
1067965
-->
@@ -1267,149 +1165,6 @@ parameters:
12671165
`true/false`(默认为 `false`)。这里需要填写字符串,即,
12681166
是 `"true"` 而不是 `true`。
12691167

1270-
### ScaleIO
1271-
1272-
```yaml
1273-
kind: StorageClass
1274-
apiVersion: storage.k8s.io/v1
1275-
metadata:
1276-
name: slow
1277-
provisioner: kubernetes.io/scaleio
1278-
parameters:
1279-
gateway: https://192.168.99.200:443/api
1280-
system: scaleio
1281-
protectionDomain: pd0
1282-
storagePool: sp1
1283-
storageMode: ThinProvisioned
1284-
secretRef: sio-secret
1285-
readOnly: "false"
1286-
fsType: xfs
1287-
```
1288-
1289-
<!--
1290-
* `provisioner`: attribute is set to `kubernetes.io/scaleio`
1291-
* `gateway`: address to a ScaleIO API gateway (required)
1292-
* `system`: the name of the ScaleIO system (required)
1293-
* `protectionDomain`: the name of the ScaleIO protection domain (required)
1294-
* `storagePool`: the name of the volume storage pool (required)
1295-
* `storageMode`: the storage provision mode: `ThinProvisioned` (default) or
1296-
`ThickProvisioned`
1297-
* `secretRef`: reference to a configured Secret object (required)
1298-
* `readOnly`: specifies the access mode to the mounted volume (default false)
1299-
* `fsType`: the file system to use for the volume (default ext4)
1300-
-->
1301-
* `provisioner`:属性设置为 `kubernetes.io/scaleio`
1302-
* `gateway` 到 ScaleIO API 网关的地址(必需)
1303-
* `system`:ScaleIO 系统的名称(必需)
1304-
* `protectionDomain`:ScaleIO 保护域的名称(必需)
1305-
* `storagePool`:卷存储池的名称(必需)
1306-
* `storageMode`:存储提供模式:`ThinProvisioned`(默认)或 `ThickProvisioned`
1307-
* `secretRef`:对已配置的 Secret 对象的引用(必需)
1308-
* `readOnly`:指定挂载卷的访问模式(默认为 false)
1309-
* `fsType`:卷的文件系统(默认是 ext4)
1310-
1311-
<!--
1312-
The ScaleIO Kubernetes volume plugin requires a configured Secret object.
1313-
The secret must be created with type `kubernetes.io/scaleio` and use the same
1314-
namespace value as that of the PVC where it is referenced
1315-
as shown in the following command:
1316-
1317-
```shell
1318-
kubectl create secret generic sio-secret --type="kubernetes.io/scaleio" \
1319-
--from-literal=username=sioadmin --from-literal=password=d2NABDNjMA== \
1320-
--namespace=default
1321-
```
1322-
-->
1323-
ScaleIO Kubernetes 卷插件需要配置一个 Secret 对象。
1324-
Secret 必须用 `kubernetes.io/scaleio` 类型创建,并与引用它的
1325-
PVC 所属的名字空间使用相同的值。如下面的命令所示:
1326-
1327-
```shell
1328-
kubectl create secret generic sio-secret --type="kubernetes.io/scaleio" \
1329-
--from-literal=username=sioadmin --from-literal=password=d2NABDNjMA== \
1330-
--namespace=default
1331-
```
1332-
1333-
### StorageOS
1334-
1335-
```yaml
1336-
apiVersion: storage.k8s.io/v1
1337-
kind: StorageClass
1338-
metadata:
1339-
name: fast
1340-
provisioner: kubernetes.io/storageos
1341-
parameters:
1342-
pool: default
1343-
description: Kubernetes volume
1344-
fsType: ext4
1345-
adminSecretNamespace: default
1346-
adminSecretName: storageos-secret
1347-
```
1348-
1349-
<!--
1350-
* `pool`: The name of the StorageOS distributed capacity pool to provision the
1351-
volume from. Uses the `default` pool which is normally present if not specified.
1352-
* `description`: The description to assign to volumes that were created dynamically.
1353-
All volume descriptions will be the same for the storage class, but different
1354-
storage classes can be used to allow descriptions for different use cases.
1355-
Defaults to `Kubernetes volume`.
1356-
* `fsType`: The default filesystem type to request. Note that user-defined rules
1357-
within StorageOS may override this value. Defaults to `ext4`.
1358-
* `adminSecretNamespace`: The namespace where the API configuration secret is
1359-
located. Required if adminSecretName set.
1360-
* `adminSecretName`: The name of the secret to use for obtaining the StorageOS
1361-
API credentials. If not specified, default values will be attempted.
1362-
-->
1363-
* `pool`:制备卷的 StorageOS 分布式容量池的名称。如果未指定,则使用通常存在的 `default` 池。
1364-
* `description`:指定给动态创建的卷的描述。所有卷描述对于存储类而言都是相同的,
1365-
但不同的 storage class 可以使用不同的描述,以区分不同的使用场景。
1366-
默认为 `Kubernetes volume`。
1367-
* `fsType`:请求的默认文件系统类型。
1368-
请注意,在 StorageOS 中用户定义的规则可以覆盖此值。默认为 `ext4`
1369-
* `adminSecretNamespace`:API 配置 secret 所在的命名空间。
1370-
如果设置了 adminSecretName,则是必需的。
1371-
* `adminSecretName`:用于获取 StorageOS API 凭证的 secret 名称。
1372-
如果未指定,则将尝试默认值。
1373-
1374-
<!--
1375-
The StorageOS Kubernetes volume plugin can use a Secret object to specify an
1376-
endpoint and credentials to access the StorageOS API. This is only required when
1377-
the defaults have been changed.
1378-
The secret must be created with type `kubernetes.io/storageos` as shown in the
1379-
following command:
1380-
1381-
```shell
1382-
kubectl create secret generic storageos-secret \
1383-
--type="kubernetes.io/storageos" \
1384-
--from-literal=apiAddress=tcp://localhost:5705 \
1385-
--from-literal=apiUsername=storageos \
1386-
--from-literal=apiPassword=storageos \
1387-
--namespace=default
1388-
```
1389-
-->
1390-
StorageOS Kubernetes 卷插件可以使 Secret 对象来指定用于访问 StorageOS API 的端点和凭据。
1391-
只有当默认值已被更改时,这才是必须的。
1392-
Secret 必须使用 `kubernetes.io/storageos` 类型创建,如以下命令:
1393-
1394-
```shell
1395-
kubectl create secret generic storageos-secret \
1396-
--type="kubernetes.io/storageos" \
1397-
--from-literal=apiAddress=tcp://localhost:5705 \
1398-
--from-literal=apiUsername=storageos \
1399-
--from-literal=apiPassword=storageos \
1400-
--namespace=default
1401-
```
1402-
1403-
<!--
1404-
Secrets used for dynamically provisioned volumes may be created in any namespace
1405-
and referenced with the `adminSecretNamespace` parameter. Secrets used by
1406-
pre-provisioned volumes must be created in the same namespace as the PVC that
1407-
references it.
1408-
-->
1409-
用于动态制备卷的 Secret 可以在任何名字空间中创建,并通过
1410-
`adminSecretNamespace` 参数引用。
1411-
预先配置的卷使用的 Secret 必须在与引用它的 PVC 在相同的名字空间中。
1412-
14131168
<!--
14141169
### Local
14151170
-->

0 commit comments

Comments
 (0)