Helm install of MariaDB on bare metal Kubernetes: “mkdir: cannot create directory ‘/bitnami/mariadb/data’: Permission denied”

Installing the MariaDB chart with Helm on Kubernetes, I ran into issues with permissions on the folder that I created for the PersistentVolume:

INFO  ==> ** Starting MariaDB setup **
INFO ==> Validating settings in MYSQL_/MARIADB_ env vars..
INFO ==> Initializing mariadb database…
mkdir: cannot create directory '/bitnami/mariadb/data': Permission denied
INFO ==> Stopping mariadb…

Per similar question here, if you’re manually creating or reusing a PersistentVolume for MariaDB, you need to “chown -R 1001:1001 /pv-dir” on the PV directory, as the MariaDB container runs with userid 1001 and group 1001.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.