Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save a-patel/c87622890a39d436b4fe7028b269ed5e to your computer and use it in GitHub Desktop.
Save a-patel/c87622890a39d436b4fe7028b269ed5e to your computer and use it in GitHub Desktop.
Kubernetes - Storage - Persistent Volumes (PV)
apiVersion: v1
kind: PersistentVolume
metadata:
name: myapp-mongo-pv
spec:
capacity:
storage: 1Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
storageClassName: myapp-sc
# persistentVolumeReclaimPolicy: Retain # StorageClass has a reclaim policy default so it'll be "inherited" by the PV
mountOptions:
- hard
- nfsvers=4.1
nfs:
path: /tmp
server: 172.17.0.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment