[zh-cn] sync /docs/concepts/storage/volumes.md
Co-authored-by: Qiming Teng <tengqm@outlook.com>
This commit is contained in:
parent
4133feba94
commit
808931814b
|
|
@ -2079,15 +2079,28 @@ FlexVolume 用户应迁移工作负载以使用对等的 CSI 驱动。
|
|||
|
||||
<!--
|
||||
## Mount propagation
|
||||
-->
|
||||
## 挂载卷的传播 {#mount-propagation}
|
||||
|
||||
{{< caution >}}
|
||||
<!--
|
||||
Mount propagation is a low-level feature that does not work consistently on all
|
||||
volume types. It is recommended to use only with `hostPath` or in-memory `emptyDir`
|
||||
volumes. See [this discussion](https://github.com/kubernetes/kubernetes/issues/95049)
|
||||
for more context.
|
||||
-->
|
||||
挂载卷的传播是一项底层功能,不能在所有类型的卷中以一致的方式工作。
|
||||
建议只在 `hostPath` 或基于内存的 `emptyDir` 卷中使用。
|
||||
详情请参考[讨论](https://github.com/kubernetes/kubernetes/issues/95049)。
|
||||
{{< /caution >}}
|
||||
|
||||
<!--
|
||||
Mount propagation allows for sharing volumes mounted by a container to
|
||||
other containers in the same pod, or even to other pods on the same node.
|
||||
|
||||
Mount propagation of a volume is controlled by the `mountPropagation` field
|
||||
in `containers[*].volumeMounts`. Its values are:
|
||||
-->
|
||||
## 挂载卷的传播 {#mount-propagation}
|
||||
|
||||
挂载卷的传播能力允许将容器安装的卷共享到同一 Pod 中的其他容器,甚至共享到同一节点上的其他 Pod。
|
||||
|
||||
卷的挂载传播特性由 `containers[*].volumeMounts` 中的 `mountPropagation` 字段控制。
|
||||
|
|
@ -2155,6 +2168,9 @@ in `containers[*].volumeMounts`. Its values are:
|
|||
* `Bidirectional` - 这种卷挂载和 `HostToContainer` 挂载表现相同。
|
||||
另外,容器创建的卷挂载将被传播回至主机和使用同一卷的所有 Pod 的所有容器。
|
||||
|
||||
该模式的典型用例是带有 FlexVolume 或 CSI 驱动的 Pod,或者需要通过
|
||||
`hostPath` 卷在主机上挂载某些东西的 Pod。
|
||||
|
||||
该模式等同于 [`mount(8)`](https://man7.org/linux/man-pages/man8/mount.8.html) 中描述的
|
||||
`rshared` 挂载传播选项。
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue