You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the pod/container is never created. It complains:
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
initdb: could not access directory "/var/lib/postgresql/data": Permission denied
I have tried setting the permissions of the mounted directory to be owned by postgres:postgres but still getting the same error.
Thanks!
The text was updated successfully, but these errors were encountered:
By using $HOME/data do you mean you are using the Mounted Host Folders of minikube. From past experience with boot2docker and "Docker for Mac", I would assume it is not possible to chown or chmod the shared folder (or sub folders) as the entrypoint script would try if started normally. You most likely just need to run the postgres container as a different user (ie --user 1000:50 on docker run). You'll need to substitute in the user and group id of the owner of the shared folder as seen from the minikube VM. See the Arbitrary --user notes on the docs on the Docker Hub.
Other notes: The shared folder may not even support what postgres needs to run (like fsync: docker/for-win#445). In this case move to a named volume or a folder on the VM that isn't shared to the host. If the shared folder is owned by root see (#558 (comment)).
Trying to setup a kubernetes cluster and have created a persistent volume thus:
where,
/data is a mounted filesystem on minikube startup, say $HOME/data.
A claim binds to the above pv:
The postgres pod is created as follows:
However, the pod/container is never created. It complains:
I have tried setting the permissions of the mounted directory to be owned by postgres:postgres but still getting the same error.
Thanks!
The text was updated successfully, but these errors were encountered: