Skip to content

Commit 82ba7be

Browse files
authored
Merge pull request #27746 from tengqm/zh-sync-concepts-3
[zh] Resync concepts section (3)
2 parents 8136093 + 4657f11 commit 82ba7be

File tree

5 files changed

+133
-140
lines changed

5 files changed

+133
-140
lines changed

content/zh/docs/concepts/storage/ephemeral-volumes.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,17 @@ features:
248248

249249
Example:
250250
-->
251-
通用临时卷与 `emptyDir` 卷类似,因为它们为暂存数据提供了一个 per-pod 的目录,该目录通常在置备后为空。
252-
但他们可能还会有其他特征
251+
通用临时卷类似于 `emptyDir` 卷,因为它为每个 Pod 提供临时数据存放目录,
252+
在最初制备完毕时一般为空。不过通用临时卷也有一些额外的功能特性
253253

254254
- 存储可以是本地的,也可以是网络连接的。
255255
- 卷可以有固定的大小,pod不能超量使用。
256256
- 卷可能有一些初始数据,这取决于驱动程序和参数。
257-
- 当驱动程序支持,卷上的典型操作将被支持,包括([快照](/zh/docs/concepts/storage/volume-snapshots/)、[克隆](/zh/docs/concepts/storage/volume-pvc-datasource/)、[调整大小](/zh/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims)和[存储容量跟踪](/zh/docs/concepts/storage/storage-capacity/))。
257+
- 当驱动程序支持,卷上的典型操作将被支持,包括
258+
([快照](/zh/docs/concepts/storage/volume-snapshots/)、
259+
[克隆](/zh/docs/concepts/storage/volume-pvc-datasource/)、
260+
[调整大小](/zh/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims)和
261+
[存储容量跟踪](/zh/docs/concepts/storage/storage-capacity/))。
258262

259263
示例:
260264

@@ -375,8 +379,8 @@ Pods (a Pod "pod-a" with volume "scratch" and another Pod with name
375379
-->
376380
这种确定性命名方式也引入了潜在的冲突,
377381
比如在不同的 Pod 之间(名为 “Pod-a” 的 Pod 挂载名为 "scratch" 的卷,
378-
名为 "pod" 的 Pod 挂载名为 “a-scratch” 的卷,这两者均会生成名为 "pod-a-scratch" 的PVC),
379-
或者在 Pod 和手工创建的 PVC 之间。
382+
和名为 "pod" 的 Pod 挂载名为 “a-scratch” 的卷,这两者均会生成名为
383+
"pod-a-scratch" 的PVC),或者在 Pod 和手工创建的 PVC 之间。
380384

381385
<!--
382386
Such conflicts are detected: a PVC is only used for an ephemeral
@@ -412,7 +416,8 @@ two choices:
412416
启用 GenericEphemeralVolume 特性会导致那些没有 PVCs 创建权限的用户,
413417
在创建 Pods 时,被允许间接的创建 PVCs。
414418
集群管理员必须意识到这一点。
415-
如果这不符合他们的安全模型,他们有两种选择:
419+
如果这不符合他们的安全模型,他们有如下选择:
420+
416421
<!--
417422
- Explicitly disable the feature through the feature gate.
418423
- Use a [Pod Security
@@ -424,19 +429,19 @@ two choices:
424429
volume.
425430
-->
426431
- 通过特性门控显式禁用该特性。
427-
- `卷`列表不包含 `ephemeral` 卷类型时,使用
428-
[Pod 安全策略](/zh/docs/concepts/policy/pod-security-policy/)
429-
Kubernetes 1.21 中已弃用)。
430-
- 使用[准入 Webhook](/zh/docs/reference/access-authn-authz/extensible-admission-controllers/)
431-
拒绝像 Pod 这样具有通用临时卷
432+
- `volumes` 列表不包含 `ephemeral` 卷类型时,使用
433+
[Pod 安全策略](/zh/docs/concepts/policy/pod-security-policy/)
434+
这一方式在 Kubernetes 1.21 版本已经弃用)
435+
- 使用一个[准入 Webhook](/zh/docs/reference/access-authn-authz/extensible-admission-controllers/)
436+
拒绝包含通用临时卷的 Pods
432437

433438
<!--
434439
The normal [namespace quota for PVCs](/docs/concepts/policy/resource-quotas/#storage-resource-quota) still applies, so
435440
even if users are allowed to use this new mechanism, they cannot use
436441
it to circumvent other policies.
437442
-->
438-
在一个命名空间中,用于 PVCs 的常规命名空间配额[用于 PVCs 的常规命名空间配额](/zh/docs/concepts/policy/resource-quotas/#storage-resource-quota)仍然适用,
439-
因此即使允许用户使用这种新机制,他们也不能使用它来规避其他策略。
443+
[为 PVC 卷所设置的逐名字空间的配额](/zh/docs/concepts/policy/resource-quotas/#storage-resource-quota)
444+
仍然有效,因此即使允许用户使用这种新机制,他们也不能使用它来规避其他策略。
440445

441446
## {{% heading "whatsnext" %}}
442447

@@ -474,5 +479,5 @@ See [local ephemeral storage](/docs/concepts/configuration/manage-resources-cont
474479

475480
- 有关设计的更多信息,参阅
476481
[Generic ephemeral inline volumes KEP](https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/1698-generic-ephemeral-volumes/README.md)。
477-
- 本特性下一步开发的更多信息,参阅
478-
[enhancement tracking issue #1698](https://github.com/kubernetes/enhancements/issues/1698).
482+
- 关于本特性下一步开发的更多信息,参阅
483+
[enhancement tracking issue #1698](https://github.com/kubernetes/enhancements/issues/1698)

content/zh/docs/concepts/storage/storage-capacity.md

Lines changed: 10 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ which a pod runs: network-attached storage might not be accessible by
1111
all nodes, or storage is local to a node to begin with.
1212
1313
{{< feature-state for_k8s_version="v1.19" state="alpha" >}}
14+
{{< feature-state for_k8s_version="v1.21" state="beta" >}}
1415
1516
This page describes how Kubernetes keeps track of storage capacity and
1617
how the scheduler uses that information to schedule Pods onto nodes
@@ -27,6 +28,7 @@ text="Container Storage Interface" term_id="csi" >}} (CSI) drivers and
2728
网络存储可能并非所有节点都能够访问,或者对于某个节点存储是本地的。
2829

2930
{{< feature-state for_k8s_version="v1.19" state="alpha" >}}
31+
{{< feature-state for_k8s_version="v1.21" state="beta" >}}
3032

3133
本页面描述了 Kubernetes 如何跟踪存储容量以及调度程序如何为了余下的尚未挂载的卷使用该信息将
3234
Pod 调度到能够访问到足够存储容量的节点上。
@@ -156,64 +158,16 @@ to handle this automatically.
156158
<!--
157159
## Enabling storage capacity tracking
158160
159-
Storage capacity tracking is an *alpha feature* and only enabled when
160-
the `CSIStorageCapacity` [feature
161-
gate](/docs/reference/command-line-tools-reference/feature-gates/) and
162-
the `storage.k8s.io/v1alpha1` {{< glossary_tooltip text="API group" term_id="api-group" >}} are enabled. For details on
163-
that, see the `--feature-gates` and `--runtime-config` [kube-apiserver
164-
parameters](/docs/reference/command-line-tools-reference/kube-apiserver/).
161+
Storage capacity tracking is a beta feature and enabled by default in
162+
a Kubernetes cluster since Kubernetes 1.21. In addition to having the
163+
feature enabled in the cluster, a CSI driver also has to support
164+
it. Please refer to the driver's documentation for details.
165165
-->
166166
## 开启存储容量跟踪
167167

168-
存储容量跟踪是一个 *alpha 特性*,只有当 `CSIStorageCapacity`
169-
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
170-
`storage.k8s.io/v1alpha1` {{< glossary_tooltip text="API 组" term_id="api-group" >}}启用时才能启用。
171-
更多详细信息,可以查看`--feature-gates``--runtime-config`
172-
[kube-apiserver 参数](/zh/docs/reference/command-line-tools-reference/kube-apiserver/)
173-
174-
<!--
175-
A quick check
176-
whether a Kubernetes cluster supports the feature is to list
177-
CSIStorageCapacity objects with:
178-
```shell
179-
kubectl get csistoragecapacities --all-namespaces
180-
```
181-
182-
If your cluster supports CSIStorageCapacity, the response is either a list of CSIStorageCapacity objects or:
183-
```
184-
No resources found
185-
```
186-
-->
187-
快速检查 Kubernetes 集群是否支持这个特性,可以通过下面命令列出 CSIStorageCapacity 对象:
188-
189-
```shell
190-
kubectl get csistoragecapacities --all-namespaces
191-
```
192-
193-
如果集群支持 CSIStorageCapacity,就会返回 CSIStorageCapacity 的对象列表或者:
194-
```
195-
No resources found
196-
```
197-
198-
<!--
199-
If not supported, this error is printed instead:
200-
```
201-
error: the server doesn't have a resource type "csistoragecapacities"
202-
```
203-
204-
In addition to enabling the feature in the cluster, a CSI
205-
driver also has to
206-
support it. Please refer to the driver's documentation for
207-
details.
208-
-->
209-
如果不支持,下面这个错误就会被打印出来:
210-
211-
```
212-
error: the server doesn't have a resource type "csistoragecapacities"
213-
```
214-
215-
除了在集群中启用该功能外,CSI 驱动程序还必须支持它。有关详细信息,请参阅驱动程序的文档。
216-
168+
存储容量跟踪是一个 Beta 特性,从 Kubernetes 1.21 版本起在 Kubernetes 集群
169+
中默认被启用。除了在集群中启用此功能特性之外,还要求 CSI 驱动支持此特性。
170+
请参阅驱动的文档了解详细信息。
217171

218172
## {{% heading "whatsnext" %}}
219173

@@ -225,6 +179,6 @@ error: the server doesn't have a resource type "csistoragecapacities"
225179
-->
226180
- 想要获得更多该设计的信息,查看
227181
[Storage Capacity Constraints for Pod Scheduling KEP](https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/1472-storage-capacity-tracking/README.md)
228-
- 有关此功能的进一步开发信息,查看
182+
- 有关此功能的下一步开发信息,查看
229183
[enhancement tracking issue #1472](https://github.com/kubernetes/enhancements/issues/1472)
230184
- 学习 [Kubernetes 调度器](/zh/docs/concepts/scheduling-eviction/kube-scheduler/)

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

Lines changed: 43 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ weight: 30
55
---
66

77
<!--
8+
reviewers:
9+
- jsafrane
10+
- saad-ali
11+
- thockin
12+
- msau42
813
title: Storage Classes
914
content_type: concept
1015
weight: 30
@@ -17,8 +22,9 @@ This document describes the concept of a StorageClass in Kubernetes. Familiarity
1722
with [volumes](/docs/concepts/storage/volumes/) and
1823
[persistent volumes](/docs/concepts/storage/persistent-volumes) is suggested.
1924
-->
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)的概念。
2228

2329
<!-- body -->
2430

@@ -45,7 +51,7 @@ Each StorageClass contains the fields `provisioner`, `parameters`, and
4551
`reclaimPolicy`, which are used when a PersistentVolume belonging to the
4652
class needs to be dynamically provisioned.
4753
48-
-->
54+
-->
4955
## StorageClass 资源
5056

5157
每个 StorageClass 都包含 `provisioner``parameters``reclaimPolicy` 字段,
@@ -61,12 +67,12 @@ StorageClass 对象的命名很重要,用户使用这个命名来请求生成
6167
当创建 StorageClass 对象时,管理员设置 StorageClass 对象的命名和其他参数,一旦创建了对象就不能再对其更新。
6268

6369
<!--
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
6571
request any particular class to bind to: see the
6672
[PersistentVolumeClaim section](/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)
6773
for details.
6874
-->
69-
管理员可以为没有申请绑定到特定 StorageClass 的 PVC 指定一个默认的存储类
75+
管理员可以为没有申请绑定到特定 StorageClass 的 PVC 指定一个默认的存储类:
7076
更多详情请参阅
7177
[PersistentVolumeClaim 章节](/zh/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)
7278

@@ -928,20 +934,19 @@ parameters:
928934
`"http(s)://api-server:7860"`
929935
* `registry`: Quobyte registry to use to mount the volume. You can specify the
930936
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.
932938
``<host1>:<port>,<host2>:<port>,<host3>:<port>``.
933939
The host can be an IP address or if you have a working DNS you can also
934940
provide the DNS names.
935941
* `adminSecretNamespace`: The namespace for `adminSecretName`.
936942
Default is "default".
937943
-->
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>`
943948
主机可以是一个 IP 地址,或者如果你有正在运行的 DNS,你也可以提供 DNS 名称。
944-
* `adminSecretNamespace`:`adminSecretName`的 namespace
949+
* `adminSecretNamespace`:`adminSecretName` 的名字空间
945950
默认值是 "default"。
946951

947952
<!--
@@ -957,15 +962,16 @@ parameters:
957962
```
958963
-->
959964

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` 的键值,
962968
例如以这种方式创建:
963969

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+
```
969975
<!--
970976
* `user`: maps all access to this user. Default is "root".
971977
* `group`: maps all access to this group. Default is "nfsnobody".
@@ -978,10 +984,10 @@ parameters:
978984
-->
979985
* `user`:对这个用户映射的所有访问权限。默认是 "root"。
980986
* `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"。
985991

986992
<!--
987993
### Azure Disk
@@ -1015,7 +1021,9 @@ parameters:
10151021
-->
10161022
* `skuName`:Azure 存储帐户 Sku 层。默认为空。
10171023
* `location`:Azure 存储帐户位置。默认为空。
1018-
* `storageAccount`:Azure 存储帐户名称。如果提供存储帐户,它必须位于与集群相同的资源组中,并且 `location` 是被忽略的。如果未提供存储帐户,则会在与群集相同的资源组中创建新的存储帐户。
1024+
* `storageAccount`:Azure 存储帐户名称。
1025+
如果提供存储帐户,它必须位于与集群相同的资源组中,并且 `location`
1026+
是被忽略的。如果未提供存储帐户,则会在与群集相同的资源组中创建新的存储帐户。
10191027

10201028
<!--
10211029
#### Azure Disk Storage Class (starting from v1.7.2) {#azure-disk-storage-class}
@@ -1058,7 +1066,8 @@ parameters:
10581066
- Managed VM can only attach managed disks and unmanaged VM can only attach
10591067
unmanaged disks.
10601068
-->
1061-
- Premium VM 可以同时添加 Standard_LRS 和 Premium_LRS 磁盘,而 Standard 虚拟机只能添加 Standard_LRS 磁盘。
1069+
- Premium VM 可以同时添加 Standard_LRS 和 Premium_LRS 磁盘,而 Standard
1070+
虚拟机只能添加 Standard_LRS 磁盘。
10621071
- 托管虚拟机只能连接托管磁盘,非托管虚拟机只能连接非托管磁盘。
10631072

10641073
<!--
@@ -1097,11 +1106,15 @@ parameters:
10971106
* `skuName`:Azure 存储帐户 Sku 层。默认为空。
10981107
* `location`:Azure 存储帐户位置。默认为空。
10991108
* `storageAccount`:Azure 存储帐户名称。默认为空。
1100-
如果不提供存储帐户,会搜索所有与资源相关的存储帐户,以找到一个匹配 `skuName` 和 `location` 的账号。
1109+
如果不提供存储帐户,会搜索所有与资源相关的存储帐户,以找到一个匹配
1110+
`skuName` 和 `location` 的账号。
11011111
如果提供存储帐户,它必须存在于与集群相同的资源组中,`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` 设置。
11051118

11061119
<!--
11071120
During storage provisioning, a secret named by `secretName` is created for the
@@ -1305,7 +1318,7 @@ kubectl create secret generic storageos-secret \
13051318
-->
13061319
StorageOS Kubernetes 卷插件可以使 Secret 对象来指定用于访问 StorageOS API 的端点和凭据。
13071320
只有当默认值已被更改时,这才是必须的。
1308-
secret 必须使用 `kubernetes.io/storageos` 类型创建,如以下命令:
1321+
Secret 必须使用 `kubernetes.io/storageos` 类型创建,如以下命令:
13091322

13101323
```shell
13111324
kubectl create secret generic storageos-secret \

0 commit comments

Comments
 (0)