1.在每台机器上安装nfs文件共享系统
yum install -y nfs-utils
2.创建共享目录(主节点上操作)
mkdir -p /opt/nfs/k8s
vi /etc/exports #编写NFS的共享配置
/opt/nfs/k8s *(rw,no_root_squash) #*代表对所有IP都开放此目录,rw是读写
3.驱动服务
systemctl enable nfs-server #开机启动
systemctl restart nfs-server #启动
showmount -e 192.168.66.101 #查看NFS共享目录
4.执行yaml文件,安装nfs
https://download.csdn.net/download/liudongyang123/85427910https://download.csdn.net/download/liudongyang123/854279105.注意将deploy.yaml文件中的这几个地方修改自己的服务器信息