apiVersion: v1
kind: PersistentVolume
metadata:
  name: postgresql-pv
  namespace: database
spec:
  storageClassName: hostpath
  persistentVolumeReclaimPolicy: Retain
  capacity:
    storage: 12Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/MainPool/Kubernetes/databases/postgresql"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: postgresql-pv-claim
  namespace: database
spec:
  storageClassName: hostpath
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi