Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For postgreSQL no need to create PV and PVC? #232

Closed
djpirra opened this issue Aug 30, 2024 · 1 comment
Closed

For postgreSQL no need to create PV and PVC? #232

djpirra opened this issue Aug 30, 2024 · 1 comment

Comments

@djpirra
Copy link

djpirra commented Aug 30, 2024

I am trying to run your configuration, however, I am trying to figure out where the files are created for the database and cannot find them.

Why we have only a PVC template and not PV and PVCs?

Apologies I am quite new to Kubernetes.

@marcel-dempers
Copy link
Owner

Volume claim templates for statefulsets automatically create PV and PVCs for you based on storage class names and storage configured for the cluster.
https://github.com/marcel-dempers/docker-development-youtube-series/blob/master/storage/databases/postgresql/4-k8s-basic/yaml/statefulset.yaml#L120

kubectl get storageclass will give you the storage available for your cluster, if we use kind in this demo, its standard as the default storage which means the PV will be local node storage

For location of data, you may have to look at earlier episodes where we cover postgres data path locations using configuration
https://github.com/marcel-dempers/docker-development-youtube-series/tree/master/storage/databases/postgresql/2-configuration#environment-variables

Hope that helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants