安装nfs (storageclass制备器)
# linux安装nfs
# 安装
yum -y install nfs-utils
1
# 挂载目录
mkdir /data/volumes -pv
1
# 配置
vim /etc/exports
1
/data/volumes *(rw,sync,no_root_squash)
1
# 开机启动
systemctl enable rpcbind.service
1
systemctl enable nfs-server.service
1
# 启动
systemctl start rpcbind.service
1
systemctl start nfs-server.service
1
# 通过查看service列中是否有nfs服务来确认NFS是否启动
rpcinfo -p
1
# 查看
showmount -e
1
# 客户端挂载
mount -t nfs stor01:/data/volumes /mnt
1
mount
1
umount /mnt/
1
# helm 安装基于K8S storageclass的nfs制备器
helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/
1
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \
--set nfs.server=node0 \
--set nfs.path=/data/volumes
1
2
3
2
3
上次更新: 2024/08/08, 06:59:58