k3s-cluster/cluster/apps/database/postgresql/pgsql-pv.yaml

27 lines
525 B
YAML
Raw Permalink Normal View History

2023-04-11 00:40:18 +00:00
apiVersion: v1
kind: PersistentVolume
metadata:
name: postgresql-pv
namespace: database
spec:
storageClassName: hostpath
2023-04-11 01:28:45 +00:00
persistentVolumeReclaimPolicy: Retain
2023-04-11 00:40:18 +00:00
capacity:
storage: 12Gi
2023-04-11 00:40:18 +00:00
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