@@ -131,6 +131,7 @@ is managed by kubelet, or injecting different data.
131
131
### CSI ephemeral volumes
132
132
-->
133
133
### CSI 临时卷 {#csi-ephemeral-volumes}
134
+
134
135
{{< feature-state for_k8s_version="v1.16" state="beta" >}}
135
136
136
137
<!--
@@ -142,12 +143,12 @@ The Kubernetes CSI [Drivers list](https://kubernetes-csi.github.io/docs/drivers.
142
143
shows which drivers support ephemeral volumes.
143
144
-->
144
145
145
- 该特性需要启用参数 ` CSIInlineVolume `
146
+ 该特性需要启用参数 ` CSIInlineVolume `
146
147
[ 特性门控(feature gate)] ( /zh/docs/reference/command-line-tools-reference/feature-gates/ ) 。
147
148
该参数从 Kubernetes 1.16 开始默认启用。
148
149
149
150
{{< note >}}
150
- 只有一部分 CSI 驱动程序支持 CSI 临时卷。Kubernetes CSI
151
+ 只有一部分 CSI 驱动程序支持 CSI 临时卷。Kubernetes CSI
151
152
[ 驱动程序列表] ( https://kubernetes-csi.github.io/docs/drivers.html )
152
153
显示了支持临时卷的驱动程序。
153
154
{{< /note >}}
@@ -170,7 +171,7 @@ Here's an example manifest for a Pod that uses CSI ephemeral storage:
170
171
从概念上讲,CSI 临时卷类似于 ` configMap ` 、` downwardAPI ` 和 ` secret ` 类型的卷:
171
172
其存储在每个节点本地管理,并在将 Pod 调度到节点后与其他本地资源一起创建。
172
173
在这个阶段,Kubernetes 没有重新调度 Pods 的概念。卷创建不太可能失败,否则 Pod 启动将会受阻。
173
- 特别是,这些卷 * 不 * 支持[ 感知存储容量的 Pod 调度] ( /zh/docs/concepts/storage/storage-capacity/ ) 。
174
+ 特别是,这些卷 ** 不 * * 支持[ 感知存储容量的 Pod 调度] ( /zh/docs/concepts/storage/storage-capacity/ ) 。
174
175
它们目前也没包括在 Pod 的存储资源使用限制中,因为 kubelet 只能对它自己管理的存储强制执行。
175
176
176
177
下面是使用 CSI 临时存储的 Pod 的示例清单:
@@ -202,32 +203,52 @@ driver. These attributes are specific to each driver and not
202
203
standardized. See the documentation of each CSI driver for further
203
204
instructions.
204
205
206
+ -->
207
+
208
+ ` volumeAttributes` 决定驱动程序准备什么样的卷。这些属性特定于每个驱动程序,且没有实现标准化。
209
+ 有关进一步的说明,请参阅每个 CSI 驱动程序的文档。
210
+
211
+ <!--
205
212
# ## CSI driver restrictions
206
213
207
214
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
208
215
[`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 >}}
213
216
-->
214
- ` volumeAttributes` 决定驱动程序准备什么样的卷。这些属性特定于每个驱动程序,且没有实现标准化。
215
- 有关进一步的说明,请参阅每个 CSI 驱动程序的文档。
216
217
217
- # ## CSI 驱动程序限制
218
+ # ## CSI 驱动程序限制 {#csi-driver-restrictions}
219
+
218
220
{{< feature-state for_k8s_version="v1.21" state="deprecated" >}}
219
221
220
- 作为一个集群管理员,你可以使用
221
- [PodSecurityPolicy](/zh/docs/concepts/security/pod-security-policy/)
222
+ 作为一个集群管理员,你可以使用
223
+ [PodSecurityPolicy](/zh/docs/concepts/security/pod-security-policy/)
222
224
来控制在 Pod 中可以使用哪些 CSI 驱动程序,
223
225
具体则是通过 [`allowedCSIDrivers` 字段](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritypolicyspec-v1beta1-policy)
224
226
指定。
225
227
228
+ <!--
229
+ {{< note >}}
230
+ PodSecurityPolicy is deprecated and will be removed in the Kubernetes v1.25 release.
231
+ {{< /note >}}
232
+ -->
233
+
226
234
{{< note >}}
227
235
PodSecurityPolicy 已弃用,并将在 Kubernetes v1.25 版本中移除。
228
236
{{< /note >}}
229
237
230
238
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
+
231
252
<!--
232
253
# ## Generic ephemeral volumes
233
254
-->
@@ -326,8 +347,8 @@ because then the scheduler is free to choose a suitable node for
326
347
the Pod. With immediate binding, the scheduler is forced to select a node that has
327
348
access to the volume once it is available.
328
349
-->
329
- 如上设置将触发卷的绑定与/或准备操作,相应动作或者在
330
- {{< glossary_tooltip text="StorageClass" term_id="storage-class" >}}
350
+ 如上设置将触发卷的绑定与/或准备操作,相应动作或者在
351
+ {{< glossary_tooltip text="StorageClass" term_id="storage-class" >}}
331
352
使用即时卷绑定时立即执行,
332
353
或者当 Pod 被暂时性调度到某节点时执行 (`WaitForFirstConsumer` 卷绑定模式)。
333
354
对于常见的临时卷,建议采用后者,这样调度器就可以自由地为 Pod 选择合适的节点。
@@ -340,7 +361,7 @@ that provide that ephemeral storage. When the Pod is deleted,
340
361
the Kubernetes garbage collector deletes the PVC, which then usually
341
362
triggers deletion of the volume because the default reclaim policy of
342
363
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,
344
365
and in this case you need to ensure that volume clean up happens separately.
345
366
-->
346
367
就[资源所有权](/zh/docs/concepts/workloads/controllers/garbage-collection/#owners-and-dependents)而言,
0 commit comments