一,環境准備
01,基礎環境
一台rancher集群
服務器搭建參考原先文章 >>飛機直達
一台nfs服務器
02,nfs服務器搭建
rpm -qa rpcbind|grep rpcbind &>/dev/null [ $? -eq 0 ] && yum install -y rpcbind ---安裝rpcbind服務 rpm -qa nfs-utils|grep nfs-utils &>/dev/null [ $? -eq 0 ] && yum install -y nfs-utils ----安裝nfc服務 systemctl start rpcbind systemctl start nfs-server echo '*(insecure,rw,async,no_root_squash)>' >/etc/exports ----配置訪問規則 systemctl restart nfs-server &>/dev/null showmount -e 192.168.0.167 df -h
二,rancher 連接
01,配置nfs持久卷
打開rancher2.0web界面
點擊右邊的添加
02,添加持久卷
03,服務上線
部署完成后點擊啟動即可