From 2644caf717bed03a4603df9e9369ea2eb4a768b0 Mon Sep 17 00:00:00 2001 From: ydFu Date: Tue, 27 Apr 2021 14:56:50 +0800 Subject: [PATCH] [zh] Sync storage pages for ephemeral-volumes.md * Sync with english version in '[en] Remove redundant feature gate introductions'(#27663) Signed-off-by: ydFu --- .../concepts/storage/ephemeral-volumes.md | 43 ++++++++++++------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/content/zh/docs/concepts/storage/ephemeral-volumes.md b/content/zh/docs/concepts/storage/ephemeral-volumes.md index 47eab07777..c5195ac56d 100644 --- a/content/zh/docs/concepts/storage/ephemeral-volumes.md +++ b/content/zh/docs/concepts/storage/ephemeral-volumes.md @@ -141,6 +141,7 @@ CSI ephemeral volumes are only supported by a subset of CSI drivers. The Kubernetes CSI [Drivers list](https://kubernetes-csi.github.io/docs/drivers.html) shows which drivers support ephemeral volumes. --> + 该特性需要启用参数 `CSIInlineVolume` [特性门控(feature gate)](/zh/docs/reference/command-line-tools-reference/feature-gates/)。 该参数从 Kubernetes 1.16 开始默认启用。 @@ -158,7 +159,7 @@ Conceptually, CSI ephemeral volumes are similar to `configMap`, scheduled onto a node. Kubernetes has no concept of rescheduling Pods anymore at this stage. Volume creation has to be unlikely to fail, otherwise Pod startup gets stuck. In particular, [storage capacity -aware Pod scheduling](/docs/concepts/storage-capacity/) is *not* +aware Pod scheduling](/docs/concepts/storage/storage-capacity/) is *not* supported for these volumes. They are currently also not covered by the storage resource usage limits of a Pod, because that is something 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 --> ### 通用临时卷 {#generic-ephemeral-volumes} -{{< feature-state for_k8s_version="v1.19" state="alpha" >}} +{{< feature-state for_k8s_version="v1.21" state="beta" >}} 这个特性需要启用 `GenericEphemeralVolume` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)。 -因为这是一个alpha特性,默认禁用。 +因为这是一个 beta 特性,默认情况下启用。 -通用临时卷类似于 `emptyDir` 卷,但更加灵活: +通用临时卷与 `emptyDir` 卷类似,因为它们为暂存数据提供了一个 per-pod 的目录,该目录通常在置备后为空。 +但他们可能还会有其他特征: + - 存储可以是本地的,也可以是网络连接的。 - 卷可以有固定的大小,pod不能超量使用。 - 卷可能有一些初始数据,这取决于驱动程序和参数。 @@ -408,23 +414,28 @@ two choices: 集群管理员必须意识到这一点。 如果这不符合他们的安全模型,他们有两种选择: -- 通过特性门控显式禁用该特性,可以避免将来的 Kubernetes 版本默认启用时带来混乱。 +- 通过特性门控显式禁用该特性。 - 当`卷`列表不包含 `ephemeral` 卷类型时,使用 - [Pod 安全策略](/zh/docs/concepts/policy/pod-security-policy/)。 + [Pod 安全策略](/zh/docs/concepts/policy/pod-security-policy/) + (在 Kubernetes 1.21 中已弃用)。 +- 使用[准入 Webhook](/zh/docs/reference/access-authn-authz/extensible-admission-controllers/) + 拒绝像 Pod 这样具有通用临时卷。 -在一个命名空间中,用于 PVCs 的常规命名空间配额仍然适用, +在一个命名空间中,用于 PVCs 的常规命名空间配额[用于 PVCs 的常规命名空间配额](/zh/docs/concepts/policy/resource-quotas/#storage-resource-quota)仍然适用, 因此即使允许用户使用这种新机制,他们也不能使用它来规避其他策略。 ## {{% heading "whatsnext" %}}