Skip to content

Commit 77de2d6

Browse files
authored
docs: sync ephermeral-volumes.md (#32716)
1 parent b3b7a18 commit 77de2d6

File tree

1 file changed

+36
-15
lines changed

1 file changed

+36
-15
lines changed

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

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ is managed by kubelet, or injecting different data.
131131
### CSI ephemeral volumes
132132
-->
133133
### CSI 临时卷 {#csi-ephemeral-volumes}
134+
134135
{{< feature-state for_k8s_version="v1.16" state="beta" >}}
135136

136137
<!--
@@ -142,12 +143,12 @@ The Kubernetes CSI [Drivers list](https://kubernetes-csi.github.io/docs/drivers.
142143
shows which drivers support ephemeral volumes.
143144
-->
144145

145-
该特性需要启用参数 `CSIInlineVolume`
146+
该特性需要启用参数 `CSIInlineVolume`
146147
[特性门控(feature gate)](/zh/docs/reference/command-line-tools-reference/feature-gates/)
147148
该参数从 Kubernetes 1.16 开始默认启用。
148149

149150
{{< note >}}
150-
只有一部分 CSI 驱动程序支持 CSI 临时卷。Kubernetes CSI
151+
只有一部分 CSI 驱动程序支持 CSI 临时卷。Kubernetes CSI
151152
[驱动程序列表](https://kubernetes-csi.github.io/docs/drivers.html)
152153
显示了支持临时卷的驱动程序。
153154
{{< /note >}}
@@ -170,7 +171,7 @@ Here's an example manifest for a Pod that uses CSI ephemeral storage:
170171
从概念上讲,CSI 临时卷类似于 `configMap``downwardAPI``secret` 类型的卷:
171172
其存储在每个节点本地管理,并在将 Pod 调度到节点后与其他本地资源一起创建。
172173
在这个阶段,Kubernetes 没有重新调度 Pods 的概念。卷创建不太可能失败,否则 Pod 启动将会受阻。
173-
特别是,这些卷 ** 支持[感知存储容量的 Pod 调度](/zh/docs/concepts/storage/storage-capacity/)
174+
特别是,这些卷 **** 支持[感知存储容量的 Pod 调度](/zh/docs/concepts/storage/storage-capacity/)
174175
它们目前也没包括在 Pod 的存储资源使用限制中,因为 kubelet 只能对它自己管理的存储强制执行。
175176

176177
下面是使用 CSI 临时存储的 Pod 的示例清单:
@@ -202,32 +203,52 @@ driver. These attributes are specific to each driver and not
202203
standardized. See the documentation of each CSI driver for further
203204
instructions.
204205

206+
-->
207+
208+
`volumeAttributes` 决定驱动程序准备什么样的卷。这些属性特定于每个驱动程序,且没有实现标准化。
209+
有关进一步的说明,请参阅每个 CSI 驱动程序的文档。
210+
211+
<!--
205212
### CSI driver restrictions
206213

207214
As a cluster administrator, you can use a [PodSecurityPolicy](/docs/concepts/security/pod-security-policy/) to control which CSI drivers can be used in a Pod, specified with the
208215
[`allowedCSIDrivers` field](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritypolicyspec-v1beta1-policy).
209-
210-
{{< note >}}
211-
PodSecurityPolicy is deprecated and will be removed in the Kubernetes v1.25 release.
212-
{{< /note >}}
213216
-->
214-
`volumeAttributes` 决定驱动程序准备什么样的卷。这些属性特定于每个驱动程序,且没有实现标准化。
215-
有关进一步的说明,请参阅每个 CSI 驱动程序的文档。
216217

217-
### CSI 驱动程序限制
218+
### CSI 驱动程序限制 {#csi-driver-restrictions}
219+
218220
{{< feature-state for_k8s_version="v1.21" state="deprecated" >}}
219221

220-
作为一个集群管理员,你可以使用
221-
[PodSecurityPolicy](/zh/docs/concepts/security/pod-security-policy/)
222+
作为一个集群管理员,你可以使用
223+
[PodSecurityPolicy](/zh/docs/concepts/security/pod-security-policy/)
222224
来控制在 Pod 中可以使用哪些 CSI 驱动程序,
223225
具体则是通过 [`allowedCSIDrivers` 字段](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritypolicyspec-v1beta1-policy)
224226
指定。
225227

228+
<!--
229+
{{< note >}}
230+
PodSecurityPolicy is deprecated and will be removed in the Kubernetes v1.25 release.
231+
{{< /note >}}
232+
-->
233+
226234
{{< note >}}
227235
PodSecurityPolicy 已弃用,并将在 Kubernetes v1.25 版本中移除。
228236
{{< /note >}}
229237

230238

239+
<!--
240+
{{< note >}}
241+
CSI ephemeral volumes are only supported by a subset of CSI drivers.
242+
The Kubernetes CSI [Drivers list](https://kubernetes-csi.github.io/docs/drivers.html)
243+
shows which drivers support ephemeral volumes.
244+
{{< /note >}}
245+
-->
246+
247+
{{< note >}}
248+
CSI 临时卷仅有 CSI 驱动程序的一个子集支持。
249+
Kubernetes CSI [驱动列表](https://kubernetes-csi.github.io/docs/drivers.html)显示了哪些驱动程序支持临时卷。
250+
{{< /note >}}
251+
231252
<!--
232253
### Generic ephemeral volumes
233254
-->
@@ -326,8 +347,8 @@ because then the scheduler is free to choose a suitable node for
326347
the Pod. With immediate binding, the scheduler is forced to select a node that has
327348
access to the volume once it is available.
328349
-->
329-
如上设置将触发卷的绑定与/或准备操作,相应动作或者在
330-
{{< glossary_tooltip text="StorageClass" term_id="storage-class" >}}
350+
如上设置将触发卷的绑定与/或准备操作,相应动作或者在
351+
{{< glossary_tooltip text="StorageClass" term_id="storage-class" >}}
331352
使用即时卷绑定时立即执行,
332353
或者当 Pod 被暂时性调度到某节点时执行 (`WaitForFirstConsumer` 卷绑定模式)。
333354
对于常见的临时卷,建议采用后者,这样调度器就可以自由地为 Pod 选择合适的节点。
@@ -340,7 +361,7 @@ that provide that ephemeral storage. When the Pod is deleted,
340361
the Kubernetes garbage collector deletes the PVC, which then usually
341362
triggers deletion of the volume because the default reclaim policy of
342363
storage classes is to delete volumes. You can create quasi-ephemeral local storage
343-
using a StorageClass with a reclaim policy of `retain`: the storage outlives the Pod,
364+
using a StorageClass with a reclaim policy of `retain`: the storage outlives the Pod,
344365
and in this case you need to ensure that volume clean up happens separately.
345366
-->
346367
就[资源所有权](/zh/docs/concepts/workloads/controllers/garbage-collection/#owners-and-dependents)而言,

0 commit comments

Comments
 (0)