Kubernetes nfs动态storageclass
nfs安装 yum install -y nfs-utils systemctl start nfs-server mkdir /data/nfs/k8s -p echo "/data/nfs *(rw,sync,no_subtree_check,no_root_squash)" > /etc/exports exportfs -r systemctl reload nfs-server 静态持久卷 cat <<EOF | kubectl apply -f - apiVersion: v1 kind: PersistentVolume metadata: name: nfs-pv spec: capacity: storage: 5Gi volumeMode: Filesystem accessModes: - ReadWriteMany persistentVolumeReclaimPolicy: Recycle storageClassName: nfs-slow mountOptions: - hard - nfsvers=4.1 nfs: path: /data/nfs/k8s server: 192.168.10.228 EOF cat <<EOF
Posted by BlueFat on Monday, November 23, 2020