分享
重装NFS
输入“/”快速插入内容
重装NFS
用户1525
用户1525
2024年9月13日修改
1.
安装nfs(全部节点都要操作)
[root@master nfs]# yum install nfs-utils -y
[root@master nfs]# systemctl start nfs-server
1.1
Master节点下创建共享主目录
创建/data/nfs共享文件目录
[root@master nfs]# vi /etc/exports
内容只有一行如下:
/data/nfs 10.1.11.0/24(rw,sync,no_subtree_check,no_root_squash)
[root@master nfs]# exportfs -f
[root@master nfs]# systemctl reload nfs-server
1.2
Node两节点挂载对应的目录
[root@node1 ~]# mount -t nfs
10.1.11.48
:/data/nfs /data/nfs
[root@node2 ~]# mount -t nfs 10.1.11.48:/data/nfs /data/nfs
2.
执行yaml文件
[root@master nfs]# kubectl apply -f
nfs-provisioner-rbac.yaml
[root@master nfs]# kubectl apply -f
nfs-provisioner-deployment.yaml
[root@master nfs]# kubectl apply -f
nfs-storage-class.yaml
[root@master nfs]# kubectl get sc