- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们的方案:
我们使用ceph rbd存储一些机器学习训练数据集,其工作流程如下:
使用AccessMode:ReadWriteOnce创建一个ceph-rbd pvc pvc-tranining-data。
使用1个容器创建一个写入作业,以装入pvc-training-data并将训练数据写入pvc-training-data。
将训练数据写入pvc-training-data后,容器将退出,并且k8s将pvc-trainiing-data pvc卸载,写入工作完成。
创建一个具有n个容器的读取作业,其中n >= 1
使用readOnly: true
装载pvc-training-data来消耗训练数据。
顺便说一句:我们使用k8s 1.6.1
到目前为止,工作流程在我们的使用场景中效果很好,但是我对PVC AccessMode和带有AccessMode的ceph rbd有一些疑问:ReadWriteOnce。
How to understand AccessModes: ReadOnlyMany, ReadWriteOnce, ReadWriteMany? I think the usage scope is ReadOnlyMany < ReadWriteOnce < ReadWriteMay, so if I apply a PVC with AccessMode: ReadWriteOnce, it is ok I use it as AccessMode: ReadOnlyMany PVC, am I right?
ceph rbd is a block device, each container(on different host) mount the same ceph rbd device will have their own filesystem, so the only allowed AccessMode is ReadOnlyMany or ReadWriteOnce, should we impose restrictions on ReadWriteOnce usage in k8s code?
- If a ReadWriteOnce pvc is mounted by a Pod with readOnly:false then no more Pod can mount this device, until it is unmounted.
- If a ReadWriteOnce pvc is mounted by a Pod with readOnly:true, it only can be mounted to other Pod as long as they set readOnly: true.
- there's no restrictions on container with in the same Pod, as they share the same filesystem from host ${KUBELET_ROOT}/plugins/{xx}/
最佳答案
关于第一个问题:
- How to understand AccessModes: ReadOnlyMany, ReadWriteOnce, ReadWriteMany? I think the usage scope is ReadOnlyMany < ReadWriteOnce < ReadWriteMay, so if I apply a PVC with AccessMode: ReadWriteOnce, it is ok I use it as AccessMode: ReadOnlyMany PVC, am I right?
Important! A volume can only be mounted using one access mode at a
time, even if it supports many.
关于kubernetes - 具有AccessMode的Kubernetes PVC:ReadWriteOnce,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44173653/
我是一名优秀的程序员,十分优秀!