Skip to content

Commit 138c826

Browse files
authored
Merge pull request #27684 from ydFu/update-ephemeral-volumes
[zh] Sync storage pages for ephemeral-volumes.md
2 parents 36503e7 + 2644caf commit 138c826

File tree

1 file changed

+27
-16
lines changed

1 file changed

+27
-16
lines changed

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

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ CSI ephemeral volumes are only supported by a subset of CSI drivers.
141141
The Kubernetes CSI [Drivers list](https://kubernetes-csi.github.io/docs/drivers.html)
142142
shows which drivers support ephemeral volumes.
143143
-->
144+
144145
该特性需要启用参数 `CSIInlineVolume`
145146
[特性门控(feature gate)](/zh/docs/reference/command-line-tools-reference/feature-gates/)
146147
该参数从 Kubernetes 1.16 开始默认启用。
@@ -158,7 +159,7 @@ Conceptually, CSI ephemeral volumes are similar to `configMap`,
158159
scheduled onto a node. Kubernetes has no concept of rescheduling Pods
159160
anymore at this stage. Volume creation has to be unlikely to fail,
160161
otherwise Pod startup gets stuck. In particular, [storage capacity
161-
aware Pod scheduling](/docs/concepts/storage-capacity/) is *not*
162+
aware Pod scheduling](/docs/concepts/storage/storage-capacity/) is *not*
162163
supported for these volumes. They are currently also not covered by
163164
the storage resource usage limits of a Pod, because that is something
164165
that kubelet can only enforce for storage that it manages itself.
@@ -218,19 +219,22 @@ As a cluster administrator, you can use a [PodSecurityPolicy](/docs/concepts/pol
218219
-->
219220
### 通用临时卷 {#generic-ephemeral-volumes}
220221

221-
{{< feature-state for_k8s_version="v1.19" state="alpha" >}}
222+
{{< feature-state for_k8s_version="v1.21" state="beta" >}}
222223

223224
<!--
224225
This feature requires the `GenericEphemeralVolume` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to be
225-
enabled. Because this is an alpha feature, it is disabled by default.
226+
enabled. Because this is a beta feature, it is enabled by default.
226227
-->
227228
这个特性需要启用 `GenericEphemeralVolume`
228229
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)。
229-
因为这是一个alpha特性,默认禁用
230+
因为这是一个 beta 特性,默认情况下启用
230231

231232
<!--
232-
Generic ephemeral volumes are similar to `emptyDir` volumes, just more
233-
flexible:
233+
Generic ephemeral volumes are similar to `emptyDir` volumes in the
234+
sense that they provide a per-pod directory for scratch data that is
235+
usually empty after provisioning. But they may also have additional
236+
features:
237+
234238
- Storage can be local or network-attached.
235239
- Volumes can have a fixed size that Pods are not able to exceed.
236240
- Volumes may have some initial data, depending on the driver and
@@ -240,11 +244,13 @@ flexible:
240244
([snapshotting](/docs/concepts/storage/volume-snapshots/),
241245
[cloning](/docs/concepts/storage/volume-pvc-datasource/),
242246
[resizing](/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims),
243-
and [storage capacity tracking](/docs/concepts/storage-capacity/).
247+
and [storage capacity tracking](/docs/concepts/storage/storage-capacity/).
244248

245249
Example:
246250
-->
247-
通用临时卷类似于 `emptyDir` 卷,但更加灵活:
251+
通用临时卷与 `emptyDir` 卷类似,因为它们为暂存数据提供了一个 per-pod 的目录,该目录通常在置备后为空。
252+
但他们可能还会有其他特征:
253+
248254
- 存储可以是本地的,也可以是网络连接的。
249255
- 卷可以有固定的大小,pod不能超量使用。
250256
- 卷可能有一些初始数据,这取决于驱动程序和参数。
@@ -408,23 +414,28 @@ two choices:
408414
集群管理员必须意识到这一点。
409415
如果这不符合他们的安全模型,他们有两种选择:
410416
<!--
411-
- Explicitly disable the feature through the feature gate, to avoid
412-
being surprised when some future Kubernetes version enables it
413-
by default.
417+
- Explicitly disable the feature through the feature gate.
414418
- Use a [Pod Security
415419
Policy](/docs/concepts/policy/pod-security-policy/) where the
416-
`volumes` list does not contain the `ephemeral` volume type.
420+
`volumes` list does not contain the `ephemeral` volume type
421+
(deprecated in Kubernetes 1.21).
422+
- Use an [admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/)
423+
which rejects objects like Pods that have a generic ephemeral
424+
volume.
417425
-->
418-
- 通过特性门控显式禁用该特性,可以避免将来的 Kubernetes 版本默认启用时带来混乱
426+
- 通过特性门控显式禁用该特性。
419427
- 当`卷`列表不包含 `ephemeral` 卷类型时,使用
420-
[Pod 安全策略](/zh/docs/concepts/policy/pod-security-policy/)。
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 这样具有通用临时卷。
421432

422433
<!--
423-
The normal namespace quota for PVCs in a namespace still applies, so
434+
The normal [namespace quota for PVCs](/docs/concepts/policy/resource-quotas/#storage-resource-quota) still applies, so
424435
even if users are allowed to use this new mechanism, they cannot use
425436
it to circumvent other policies.
426437
-->
427-
在一个命名空间中,用于 PVCs 的常规命名空间配额仍然适用
438+
在一个命名空间中,用于 PVCs 的常规命名空间配额[用于 PVCs 的常规命名空间配额](/zh/docs/concepts/policy/resource-quotas/#storage-resource-quota)仍然适用
428439
因此即使允许用户使用这种新机制,他们也不能使用它来规避其他策略。
429440

430441
## {{% heading "whatsnext" %}}

0 commit comments

Comments
 (0)