Add pv and pvc with nfs storage

This commit is contained in:
Sambo Chea 2021-10-24 20:37:12 +07:00
parent 65f0a7ccc7
commit faf8db8cc9
Signed by: sombochea
GPG Key ID: 3C7CF22A05D95490
2 changed files with 29 additions and 0 deletions

18
pv-pvc/pv-nfs.yaml Normal file
View File

@ -0,0 +1,18 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs-pv
spec:
capacity:
storage: 10Gi
volumeMode: Filesystem
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Recycle
storageClassName: nfs
mountOptions:
- hard
- nfsvers=4.1
nfs:
path: nsf-export-path
server: server-ip-address

11
pv-pvc/pvc-nfs.yaml Normal file
View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nfs-pvc
spec:
storageClassName: nfs
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi