<p>I want to deploy a MariaDB Galera instance onto a local Minikube cluster with 3 nodes via Helm.
I used the following command for that:</p>
<pre><code>helm install my-release bitnami/mariadb-galera --set rootUser.password=test --set db.name=test
</code></pre>
<p>The problem is, if I do that I get the following error in the log:</p>
<pre><code>mariadb 10:27:41.60 
mariadb 10:27:41.60 Welcome to the Bitnami mariadb-galera container
mariadb 10:27:41.60 Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-mariadb-galera
mariadb 10:27:41.60 Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-mariadb-galera/issues
mariadb 10:27:41.61 
mariadb 10:27:41.61 INFO  ==&gt; ** Starting MariaDB setup **
mariadb 10:27:41.64 INFO  ==&gt; Validating settings in MYSQL_*/MARIADB_* env vars
mariadb 10:27:41.67 INFO  ==&gt; Initializing mariadb database
mkdir: cannot create directory '/bitnami/mariadb/data': Permission denied
</code></pre>
<p>The site of the image lists the possibility to use an extra init container to fix that (<a href="https://artifacthub.io/packages/helm/bitnami/mariadb-galera#extra-init-containers" rel="nofollow noreferrer">Link</a>).</p>
<p>So I came up with the following configuration:</p>
<p>mariadb-galera-init-config.yaml</p>
<pre><code>extraInitContainers:
- name: initcontainer
  image: bitnami/minideb
  command: [&quot;chown -R 1001:1001 /bitnami/mariadb/&quot;]
</code></pre>
<p>The problem is that when I run the command with this configuration:</p>
<pre><code>helm install my-release bitnami/mariadb-galera --set rootUser.password=test --set db.name=test -f mariadb-galera-init-config.yaml
</code></pre>
<p>I get the following error on the Minikube dashboard:</p>
<pre><code>Error: failed to start container &quot;initcontainer&quot;: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: &quot;chown -R 1001:1001 /bitnami/mariadb/&quot;: stat chown -R 1001:1001 /bitnami/mariadb/: no such file or directory: unknown
</code></pre>
<p>I don't know how to fix this configuration file, or if there is some other better way to get this working...</p>

Relative_Programming
<p>In any case someone has issues with this, may I suggest running a initContainer before.</p>
<pre><code> initContainers:
      - name: mariadb-create-directory-structure
        image: busybox
        command:
          [
            &quot;sh&quot;,
            &quot;-c&quot;,
            &quot;mkdir -p /bitnami/mariadb/data &amp;&amp; chown -R 1001:1001 /bitnami&quot;,
          ]
        volumeMounts:
        - name: data
          mountPath: /bitnami
</code></pre>
