Skip to main content
Skip table of contents

Deploy MariaDB in Kubernetes

This provides an example of how to use Helm to install a quick-start MariaDB database to a Kubernetes cluster. For detailed information on MariaDB installation and configuration options, refer to documentation for Bitnami package for MariaDB.

Before you begin

Before you begin, you need a functioning Kubernetes cluster with the tools Helm and kubectl installed. For details, see the Prerequisites section.

Step 1 - Prepare passwords

Create a Kubernetes secret with your desired database passwords:

kubectl create secret generic mariadb-passwords \
    --from-literal=mariadb-root-password='foo123' \

Step 2 - Install MariaDB

Install MariaDB using Helm with a custom database name and username. This example uses the nameejbca:

helm install mariadb \
    --set auth.database=ejbca \
    --set auth.username=ejbca \
    --set auth.existingSecret=mariadb-passwords \

Step 3 - Wait for the installation to finish

Use the following command to monitor the pod creation process:

kubectl get pods -w -l

You can start using the database as soon as all pods are ready (1/1).

mariadb-0   0/1     Pending          0          1s
mariadb-0   0/1     Init:0/1         0          6s
mariadb-0   0/1     PodInitializing  0          7s
mariadb-0   0/1     Running          0          8s
mariadb-0   1/1     Running          0          37s

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.