rancher增加nfs-pvc持久卷
为什么要增加持久卷nfs
由于集群中有很多服务器,部署服务时是随机部署的,此时就会出现部署的那一台服务器挂载的目录不存在或者底下没有存放文件;因此需要一个统一管理的挂载目录服务器,只需要每次在固定的服务器上编辑文件(增删改)。
1、环境准备
需要搭建nfc服务器;
-
yum install -y rpcbind #安装rpcbind服务
-
yum install -y nfs-utils #安装nfc服务
-
systemctl start rpcbind #启动rpcbind
-
vi /etc/exports #配置访问规则 /web1 192.168.2.132/24