Description
Have tried now for 2 days to get a running postgres database up and running on Kubernetes with Azure files mountes as persistent volume - and it just does not work!
It works WITHOUT persistent storage - but as soon as I mount Azure files the pod end in a crashloop.
Have tried both Alpine and Debian in multiple versions:
I have tried the following on storageclass:
- dir_mode=0777
- file_mode=0777
- uid=999
- uid=999
in multiple combinations with setting this on the container
securityContext:
runAsUser: 999
fsGroup: 999
Even tried to chowning manually (without effec) AND trying with initContainers - but it just won't run
Note: The volume works(incl. setting ownership) if I mount it anywhere else than /var/lib/postgresql/data
Error from the logs:
- Not setting anything or trying with root as owner/context
initdb: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted -
- Mounting volume with postgres(999)
2019-01-25 12:29:05.963 UTC [36] LOG: could not link file "pg_wal/xlogtemp.36" to "pg_wal/000000010000000000000001": Operation not supported
2019-01-25 12:29:05.998 UTC [36] FATAL: could not open file "pg_wal/000000010000000000000001": No such file or directory
child process exited with exit code 1
- Mounting volume with postgres(999)
I GIVE UP! 👎
The combination of these 3 components is far from simple or intuitive - Just reading the caveats on the README.md
Any good intentions of securing the database by an entryscript like this, just makes it unusable......but that also guarantees 100% security!?
Hope someone can help and/or make this installation working and simple - Else i'm about to spin up some BAREMETAL from the 90s to host a MSSQL database! :-)
_Sorry for the yelling..........just feeling stupid spending 2 full work days on this shit.....counterfeits the whole purpose of using docker _