Hi!
I learning k8s and I have a little problem to understand PV.
For example, I want to deploy PostgreSQL which store data in /var/lib/postgresql/data
I want to use my local disk for PV so I created that and set my path: /mnt/ssd/Kubernetes/Postgres
I do not understand how PV and PVC will store my data, because I created pod1 with PostgreSQL, created new DB and kill this pod1. New pod2 still have database which I created few second time ago on pod1 but on my local disk in /mnt/ssd/Kubernetes/Postgres I do not have any files, so
- How new pod2 know about created database? How PV store data about my created database?
- Why does PV need my disk if it doesn’t hold any data on it?