kubernetes change PVC from ReadWriteOnce to ReadWriteMany

两盒软妹~` 提交于 2021-02-09 10:54:58

问题


Is it possible to change an existing PVC to ReadWriteMany from ReadWriteOnce without recreating it? I have an existing database pod and the file system has become read only for some reason. I wanted to connect another pod to the PVC to look at it.


回答1:


You can do so without changing the PVC. The Once in ReadWriteOnce is not about the number of Pods accessing the PVC but about the number of Nodes accessing it.

Create another Pod mounting the same PVC and set nodeSelector (use hostname) so it schedules on the same node where the PVC is mounted now.

Alternatively SSH into the node that has the PVC mounted already for the Pod. kubectl describe ... gives you the id you are looking for if you have many mounts.



来源:https://stackoverflow.com/questions/44321024/kubernetes-change-pvc-from-readwriteonce-to-readwritemany

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!