Skip to content

Instantly share code, notes, and snippets.

@Pamir
Last active May 30, 2018 05:45
Show Gist options
  • Save Pamir/e2f57001684aebe2aa4bdf601521aab4 to your computer and use it in GitHub Desktop.
Save Pamir/e2f57001684aebe2aa4bdf601521aab4 to your computer and use it in GitHub Desktop.
kubernetes nfs persistent volume
/etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
/data 10.0.0.0/8(rw,no_subtree_check,fsid=100)
/data 127.0.0.1(rw,no_subtree_check,fsid=100)
/prm 10.0.0.0/8(rw,no_subtree_check,fsid=100)
/prm 127.0.0.1(rw,no_subtree_check,fsid=100)
/alr 10.0.0.0/8(rw,no_subtree_check,fsid=100)
/alr 127.0.0.1(rw,no_subtree_check,fsid=100)
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-alrt
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
nfs:
path: /alr
server: 10.128.0.9
readOnly: false
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-prm
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
nfs:
path: /prm
server: 10.128.0.9
readOnly: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment