kubernetes将PVC从ReadWriteOnce更改为ReadWriteMany [英] kubernetes change PVC from ReadWriteOnce to ReadWriteMany

查看:1611
本文介绍了kubernetes将PVC从ReadWriteOnce更改为ReadWriteMany的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将现有的PVC从ReadWriteOnce更改为ReadWriteMany,而无需重新创建它?我有一个现有的数据库Pod,并且由于某种原因文件系统已变为只读状态.我想将另一个吊舱连接到PVC进行查看.

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.

推荐答案

您可以这样做,而无需更改PVC. ReadWriteOnce中的 Once 与访问PVC的Pods数量无关,而与访问PVC的节点数量无关.

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.

创建另一个安装相同PVC的Pod并设置nodeSelector(使用

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.

或者,将SSH SSH到已经为Pod安装了PVC的节点上. kubectl describe ...如果您有很多坐骑,则会为您提供所需的ID.

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.

这篇关于kubernetes将PVC从ReadWriteOnce更改为ReadWriteMany的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆