apiVersion: v1
kind: PersistentVolume                        # Create a PV
metadata:
  name: postgres-pv-volume
  labels:
    type: local
    app: stacklifo-postgres
spec:
  storageClassName: manual                    # Storage class. A PV Claim requesting the same storageClass can be bound to this volume.
  capacity:
    storage: 5Gi
  accessModes:
    - ReadWriteMany
  hostPath:                                   # hostPath PersistentVolume is used for development and testing. It uses a file/directory on the Node to emulate network-attached storage
    path: "/mnt/data"
  persistentVolumeReclaimPolicy: Retain       # Retain the PV even after PVC is deleted. 