@@ -5,6 +5,11 @@ weight: 30
5
5
---
6
6
7
7
<!--
8
+ reviewers:
9
+ - jsafrane
10
+ - saad-ali
11
+ - thockin
12
+ - msau42
8
13
title: Storage Classes
9
14
content_type: concept
10
15
weight: 30
@@ -17,8 +22,9 @@ This document describes the concept of a StorageClass in Kubernetes. Familiarity
17
22
with [volumes](/docs/concepts/storage/volumes/) and
18
23
[persistent volumes](/docs/concepts/storage/persistent-volumes) is suggested.
19
24
-->
20
- 本文描述了 Kubernetes 中 StorageClass 的概念。建议先熟悉 [ 卷] ( /zh/docs/concepts/storage/volumes/ ) 和
21
- [ 持久卷] ( /zh/docs/concepts/storage/persistent-volumes ) 的概念。
25
+ 本文描述了 Kubernetes 中 StorageClass 的概念。建议先熟悉
26
+ [ 卷] ( /zh/docs/concepts/storage/volumes/ ) 和
27
+ [ 持久卷] ( /zh/docs/concepts/storage/persistent-volumes ) 的概念。
22
28
23
29
<!-- body -->
24
30
@@ -45,7 +51,7 @@ Each StorageClass contains the fields `provisioner`, `parameters`, and
45
51
`reclaimPolicy`, which are used when a PersistentVolume belonging to the
46
52
class needs to be dynamically provisioned.
47
53
48
- -->
54
+ -->
49
55
## StorageClass 资源
50
56
51
57
每个 StorageClass 都包含 ` provisioner ` 、` parameters ` 和 ` reclaimPolicy ` 字段,
@@ -61,12 +67,12 @@ StorageClass 对象的命名很重要,用户使用这个命名来请求生成
61
67
当创建 StorageClass 对象时,管理员设置 StorageClass 对象的命名和其他参数,一旦创建了对象就不能再对其更新。
62
68
63
69
<!--
64
- Administrators can specify a default StorageClass just for PVCs that don't
70
+ Administrators can specify a default StorageClass only for PVCs that don't
65
71
request any particular class to bind to: see the
66
72
[PersistentVolumeClaim section](/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)
67
73
for details.
68
74
-->
69
- 管理员可以为没有申请绑定到特定 StorageClass 的 PVC 指定一个默认的存储类 :
75
+ 管理员可以为没有申请绑定到特定 StorageClass 的 PVC 指定一个默认的存储类:
70
76
更多详情请参阅
71
77
[ PersistentVolumeClaim 章节] ( /zh/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims ) 。
72
78
@@ -928,20 +934,19 @@ parameters:
928
934
` "http(s)://api-server:7860"`
929
935
* `registry`: Quobyte registry to use to mount the volume. You can specify the
930
936
registry as ``<host>:<port>`` pair or if you want to specify multiple
931
- registries you just have to put a comma between them e.q .
937
+ registries, put a comma between them.
932
938
` ` <host1>:<port>,<host2>:<port>,<host3>:<port>``.
933
939
The host can be an IP address or if you have a working DNS you can also
934
940
provide the DNS names.
935
941
* `adminSecretNamespace`: The namespace for `adminSecretName`.
936
942
Default is "default".
937
943
-->
938
- * `quobyteAPIServer`:Quobyte API 服务器的格式是
939
- ` "http(s)://api-server:7860"`
940
- * `registry`:用于挂载卷的 Quobyte registry。你可以指定 registry 为 ``<host>:<port>``
941
- 或者如果你想指定多个 registry,你只需要在他们之间添加逗号,例如
942
- ` ` <host1>:<port>,<host2>:<port>,<host3>:<port>``。
944
+ * `quobyteAPIServer`:Quobyte API 服务器的格式是 `"http(s)://api-server:7860"`
945
+ * `registry`:用于挂载卷的 Quobyte 仓库。你可以指定仓库为 `<host>:<port>`
946
+ 或者如果你想指定多个 registry,在它们之间添加逗号,例如
947
+ ` <host1>:<port>,<host2>:<port>,<host3>:<port>` 。
943
948
主机可以是一个 IP 地址,或者如果你有正在运行的 DNS,你也可以提供 DNS 名称。
944
- * `adminSecretNamespace`:`adminSecretName`的 namespace 。
949
+ * `adminSecretNamespace`:`adminSecretName` 的名字空间 。
945
950
默认值是 "default"。
946
951
947
952
<!--
@@ -957,15 +962,16 @@ parameters:
957
962
` ` `
958
963
-->
959
964
960
- * `adminSecretName`:保存关于 Quobyte 用户和密码的 secret,用于对 API 服务器进行身份验证。
961
- 提供的 secret 必须有值为 "kubernetes.io/quobyte" 的 type 参数 和 `user` 与 `password` 的键值,
965
+ * `adminSecretName`:保存关于 Quobyte 用户和密码的 Secret,用于对 API 服务器进行身份验证。
966
+ 提供的 secret 必须有值为 "kubernetes.io/quobyte" 的 type 参数和 `user`
967
+ 与 `password` 的键值,
962
968
例如以这种方式创建:
963
969
964
- ` ` ` shell
965
- kubectl create secret generic quobyte-admin-secret \
966
- --type="kubernetes.io/quobyte" --from-literal=key='opensesame' \
967
- --namespace=kube-system
968
- ` ` `
970
+ ` ` ` shell
971
+ kubectl create secret generic quobyte-admin-secret \
972
+ --type="kubernetes.io/quobyte" --from-literal=key='opensesame' \
973
+ --namespace=kube-system
974
+ ` ` `
969
975
<!--
970
976
* `user`: maps all access to this user. Default is "root".
971
977
* `group`: maps all access to this group. Default is "nfsnobody".
@@ -978,10 +984,10 @@ parameters:
978
984
-->
979
985
* `user`:对这个用户映射的所有访问权限。默认是 "root"。
980
986
* `group`:对这个组映射的所有访问权限。默认是 "nfsnobody"。
981
- * `quobyteConfig`:使用指定的配置来创建卷。你可以创建一个新的配置,或者,可以修改 Web console 或
982
- quobyte CLI 中现有的配置。默认是 "BASE"。
983
- * `quobyteTenant`:使用指定的租户 ID 创建/删除卷。这个 Quobyte 租户必须已经于 Quobyte。
984
- 默认是 "DEFAULT"。
987
+ * `quobyteConfig`:使用指定的配置来创建卷。你可以创建一个新的配置,
988
+ 或者,可以修改 Web 控制台或 quobyte CLI 中现有的配置。默认是 "BASE"。
989
+ * `quobyteTenant`:使用指定的租户 ID 创建/删除卷。这个 Quobyte 租户必须
990
+ 已经于 Quobyte 中存在。 默认是 "DEFAULT"。
985
991
986
992
<!--
987
993
# ## Azure Disk
@@ -1015,7 +1021,9 @@ parameters:
1015
1021
-->
1016
1022
* `skuName`:Azure 存储帐户 Sku 层。默认为空。
1017
1023
* `location`:Azure 存储帐户位置。默认为空。
1018
- * `storageAccount`:Azure 存储帐户名称。如果提供存储帐户,它必须位于与集群相同的资源组中,并且 `location` 是被忽略的。如果未提供存储帐户,则会在与群集相同的资源组中创建新的存储帐户。
1024
+ * `storageAccount`:Azure 存储帐户名称。
1025
+ 如果提供存储帐户,它必须位于与集群相同的资源组中,并且 `location`
1026
+ 是被忽略的。如果未提供存储帐户,则会在与群集相同的资源组中创建新的存储帐户。
1019
1027
1020
1028
<!--
1021
1029
# ### Azure Disk Storage Class (starting from v1.7.2) {#azure-disk-storage-class}
@@ -1058,7 +1066,8 @@ parameters:
1058
1066
- Managed VM can only attach managed disks and unmanaged VM can only attach
1059
1067
unmanaged disks.
1060
1068
-->
1061
- - Premium VM 可以同时添加 Standard_LRS 和 Premium_LRS 磁盘,而 Standard 虚拟机只能添加 Standard_LRS 磁盘。
1069
+ - Premium VM 可以同时添加 Standard_LRS 和 Premium_LRS 磁盘,而 Standard
1070
+ 虚拟机只能添加 Standard_LRS 磁盘。
1062
1071
- 托管虚拟机只能连接托管磁盘,非托管虚拟机只能连接非托管磁盘。
1063
1072
1064
1073
<!--
@@ -1097,11 +1106,15 @@ parameters:
1097
1106
* `skuName`:Azure 存储帐户 Sku 层。默认为空。
1098
1107
* `location`:Azure 存储帐户位置。默认为空。
1099
1108
* `storageAccount`:Azure 存储帐户名称。默认为空。
1100
- 如果不提供存储帐户,会搜索所有与资源相关的存储帐户,以找到一个匹配 `skuName` 和 `location` 的账号。
1109
+ 如果不提供存储帐户,会搜索所有与资源相关的存储帐户,以找到一个匹配
1110
+ ` skuName` 和 `location` 的账号。
1101
1111
如果提供存储帐户,它必须存在于与集群相同的资源组中,`skuName` 和 `location` 会被忽略。
1102
- * `secretNamespace`:包含 Azure 存储帐户名称和密钥的密钥的名称空间。 默认值与 Pod 相同。
1103
- * `secretName`:包含 Azure 存储帐户名称和密钥的密钥的名称。 默认值为 `azure-storage-account-<accountName>-secret`
1104
- * `readOnly`:指示是否将存储安装为只读的标志。默认为 false,表示 读/写 挂载。 该设置也会影响VolumeMounts中的 `ReadOnly` 设置。
1112
+ * `secretNamespace`:包含 Azure 存储帐户名称和密钥的密钥的名称空间。
1113
+ 默认值与 Pod 相同。
1114
+ * `secretName`:包含 Azure 存储帐户名称和密钥的密钥的名称。
1115
+ 默认值为 `azure-storage-account-<accountName>-secret`
1116
+ * `readOnly`:指示是否将存储安装为只读的标志。默认为 false,表示"读/写"挂载。
1117
+ 该设置也会影响VolumeMounts中的 `ReadOnly` 设置。
1105
1118
1106
1119
<!--
1107
1120
During storage provisioning, a secret named by `secretName` is created for the
@@ -1305,7 +1318,7 @@ kubectl create secret generic storageos-secret \
1305
1318
-->
1306
1319
StorageOS Kubernetes 卷插件可以使 Secret 对象来指定用于访问 StorageOS API 的端点和凭据。
1307
1320
只有当默认值已被更改时,这才是必须的。
1308
- secret 必须使用 `kubernetes.io/storageos` 类型创建,如以下命令:
1321
+ Secret 必须使用 `kubernetes.io/storageos` 类型创建,如以下命令:
1309
1322
1310
1323
` ` ` shell
1311
1324
kubectl create secret generic storageos-secret \
0 commit comments