Open
Description
I have a PostgreSQL single-replica application running on my local microk8s. It has the following PVC:
volumeMounts:
- name: postgresql-persistent-storage
mountPath: /var/lib/postgresql
subPath: postgresql
volumeClaimTemplates:
- metadata:
name: postgresql-persistent-storage
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 10Gi
PVC:
postgresql-persistent-storage-postgresql-0 Bound pvc-373b6765-599e-4177-ae76-097b56911dbd 10Gi RWO microk8s-hostpath 35d
PV:
pvc-373b6765-599e-4177-ae76-097b56911dbd 10Gi RWO Delete Bound default/postgresql-persistent-storage-postgresql-0 microk8s-hostpath 36d
I find out that everytime when my laptop reboots and the application restarts automatically, the tables are empty that I have to reload the data. This contradicts with my understanding that the PV/PVC which has physical SSD storage is persistent storage and shouldn't be cleared by system / application restart unless intentionally done so by the application itself? What do I miss?
Metadata
Metadata
Assignees
Labels
No labels