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界面 

Rancher2.0 外置存储卷

点击右边的添加

Rancher2.0 外置存储卷

 

Rancher2.0 外置存储卷

Rancher2.0 外置存储卷

Rancher2.0 外置存储卷

  02,添加持久卷

Rancher2.0 外置存储卷

Rancher2.0 外置存储卷

 Rancher2.0 外置存储卷

  03,服务上线

Rancher2.0 外置存储卷

Rancher2.0 外置存储卷

Rancher2.0 外置存储卷

部署完成后点击启动即可

相关文章: