-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Postgres AKS persistent volume mapping problem #833
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
Comments
From https://docs.microsoft.com/en-us/azure/storage/files/storage-files-compare-protocols you might try the "NFS preview" which supports hard links, instead of SMB |
I tried it, but appears mounting problems ... and it's has its cost. |
Any ideas are welcome, but I've tried every alternative I've found and it does not work |
Oook, I think I have the solution.
What is weird is despite db files are no longer stored in /var/lib/postgresql/data the pod have a mount on that path: But there is not a filesystem mounted (at least as df shows): I don't have time to research on this, but it looks like that partition could cause all of this problems ... |
Uh oh!
There was an error while loading. Please reload this page.
Using postgres in a AKS (Azure k8s Service) it is not possible to map a folder of the pod to a persistent volume. The contents of the mapped folder does not appear in pv.
If you manually create a file via azure portal into the pv you can't see it on the pod files and vice versa.
To reproduce it at first instance in aks cluster below is my setup:
As you can see I create a PVC (using storageClass azurefile) used by a deployment to map a persistent volume to store the contents of the database (avoiding permissions problems setting subPath in the volumeMount).
I have tried to create the pv using manual config (not using pvc’s, creating the volume and accesing it with a secret into the deployment), using azureDisk instead of azureFile storage and the problem persists, the contents of the data folder are not mapped and if the pod dies, data dies with it.
I also tried to change default postgres data folder through PGDATA env variable, play with permissions (777) of data folder files, and issue is always there, looks like the volume is not correctly mapped.
Talk with azure support guys and they do not have registered this as azure storage issue, looks like only appears when using postgres image.
The text was updated successfully, but these errors were encountered: