File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
content/zh-cn/docs/concepts/storage Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -2079,15 +2079,28 @@ FlexVolume 用户应迁移工作负载以使用对等的 CSI 驱动。
2079
2079
2080
2080
<!--
2081
2081
# # Mount propagation
2082
+ -->
2083
+ # # 挂载卷的传播 {#mount-propagation}
2084
+
2085
+ {{< caution >}}
2086
+ <!--
2087
+ Mount propagation is a low-level feature that does not work consistently on all
2088
+ volume types. It is recommended to use only with `hostPath` or in-memory `emptyDir`
2089
+ volumes. See [this discussion](https://github.com/kubernetes/kubernetes/issues/95049)
2090
+ for more context.
2091
+ -->
2092
+ 挂载卷的传播是一项底层功能,不能在所有类型的卷中以一致的方式工作。
2093
+ 建议只在 `hostPath` 或基于内存的 `emptyDir` 卷中使用。
2094
+ 详情请参考[讨论](https://github.com/kubernetes/kubernetes/issues/95049)。
2095
+ {{< /caution >}}
2082
2096
2097
+ <!--
2083
2098
Mount propagation allows for sharing volumes mounted by a container to
2084
2099
other containers in the same pod, or even to other pods on the same node.
2085
2100
2086
2101
Mount propagation of a volume is controlled by the `mountPropagation` field
2087
2102
in `containers[*].volumeMounts`. Its values are :
2088
2103
-->
2089
- # # 挂载卷的传播 {#mount-propagation}
2090
-
2091
2104
挂载卷的传播能力允许将容器安装的卷共享到同一 Pod 中的其他容器,甚至共享到同一节点上的其他 Pod。
2092
2105
2093
2106
卷的挂载传播特性由 `containers[*].volumeMounts` 中的 `mountPropagation` 字段控制。
@@ -2155,6 +2168,9 @@ in `containers[*].volumeMounts`. Its values are:
2155
2168
* `Bidirectional` - 这种卷挂载和 `HostToContainer` 挂载表现相同。
2156
2169
另外,容器创建的卷挂载将被传播回至主机和使用同一卷的所有 Pod 的所有容器。
2157
2170
2171
+ 该模式的典型用例是带有 FlexVolume 或 CSI 驱动的 Pod,或者需要通过
2172
+ ` hostPath` 卷在主机上挂载某些东西的 Pod。
2173
+
2158
2174
该模式等同于 [`mount(8)`](https://man7.org/linux/man-pages/man8/mount.8.html) 中描述的
2159
2175
` rshared` 挂载传播选项。
2160
2176
You can’t perform that action at this time.
0 commit comments