Add a Shared Persistent Volume to the Cluster

Use the following YAML based on the NFS server created at the previous step. Change 10.0.32.6 to the internal IP recorded at the previous stage. If method other than NFS was used, then use the appropriate YAML for that method.

apiVersion: v1
kind: PersistentVolume
metadata:
 name: data-volume-mongodb
 labels:
   role: mongo-for-nvmesh
spec:
 capacity:
   storage: 20Gi
 volumeMode: Filesystem
 accessModes:
   - ReadWriteOnce
 persistentVolumeReclaimPolicy: Recycle
 storageClassName: default
 nfs:
   server: 10.240.0.9
   path: /opt/nvmesh/mongo/
apiVersion: v1
kind: PersistentVolume
metadata:
 name: nvmesh-backup-0
 labels:
   role: nvmesh-backups
spec:
 capacity:
   storage: 5Gi
 volumeMode: Filesystem
 accessModes:
   - ReadWriteOnce
 persistentVolumeReclaimPolicy: Recycle
 storageClassName: default
 nfs:
   server: 10.240.0.9
   path: /opt/nvmesh/backups

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment