nfs-client
安装NFS
yum install nfs-utils
systemctl enable rpcbind
systemctl enable nfs
systemctl start rpcbind
systemctl start nfs
mkdir /data
chmod 755 /data
vi /etc/exports
/data/ 192.168.0.0/24(rw,sync,no_root_squash,no_all_squash)
systemctl restart nfs
showmount -e localhost
Export list for localhost:
/data 192.168.0.0/24
helm安装nfs-client
helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/
helm repo update
helm install my-nfs nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \
--set nfs.server=x.x.x.x \
--set nfs.path=/data
--set image.repository=hub.deri.org.cn/k8s/nfs-subdir-external-provisioner
--set storageClass.name=my-nfs
--set storageClass.provisionerName=cluster.local/nfsxxx
helm install nfs-client nfs-subdir-external-provisioner/nfs-subdir-external-provisioner --set nfs.server=192.168.3.22 --set nfs.path=/data/nfs --set image.repository=hub.deri.org.cn/k8s/nfs-subdir-external-provisioner --set storageClass.name=nfs-client --set storageClass.provisionerName=cluster.local/nfs-client