Skip to main content
helm chart · mariadb

MariaDB

Helm chart for deploying mariadb datastore

Latest version
v0.0.6
Chart type
Data source
Requires
Helm 3+

Install

Add the zop.dev chart repository, then install mariadb into your cluster.

helm repo add zopdev https://helm.zop.dev
helm repo update
helm install my-mariadb zopdev/mariadb --version v0.0.6

This Helm chart deploys a MariaDB cluster on Kubernetes, including master-slave replication. Below is a detailed guide to the configuration options available.


Prerequisites

  • Kubernetes 1.18+
  • Helm 3.0+

Add Helm Repository

Add the Helm repository by running:

Terminal window
helm repo add zopdev https://helm.zop.dev
helm repo update

For more details, see the Helm Repository Documentation.


Install Helm Chart

To deploy the MariaDB Helm chart, use the following command:

Terminal window
helm install [RELEASE_NAME] zopdev/mariadb

Replace [RELEASE_NAME] with your desired release name. Example:

Terminal window
helm install my-mariadb zopdev/mariadb

You can override default values during installation by providing a values.yaml file.

Refer to the Helm Install Documentation for further details.


Uninstall Helm Chart

To remove the MariaDB Helm chart and associated resources, run:

Terminal window
helm uninstall [RELEASE_NAME]

Example:

Terminal window
helm uninstall my-mariadb

Check the Helm Uninstall Documentation for more information.


Configuration

The table below outlines the essential global configuration options. For specific master and slave configurations, refer to their respective sections below.

Global Configuration

InputTypeDescriptionDefault
image.registryStringDocker registry for the MariaDB image.docker.io
image.repositoryStringRepository for the MariaDB image.bitnami/mariadb
image.tagStringMariaDB image tag.10.3.22-debian-10-r27
image.pullPolicyStringImage pull policy.IfNotPresent
rootUser.passwordStringRoot password for MariaDB."root"
replication.enabledBoolEnable master-slave replication.true
replication.userStringUsername for replication.replicator
replication.passwordStringPassword for the replication user."root"

Master Configuration

InputTypeDescriptionDefault
master.resources.requests.cpuStringCPU request for the MariaDB master."500m"
master.resources.requests.memoryStringMemory request for the MariaDB master."256Mi"
master.resources.limits.cpuStringCPU limit for the MariaDB master."1500m"
master.resources.limits.memoryStringMemory limit for the MariaDB master."1Gi"
master.persistence.sizeStringPersistent storage size for the master."10Gi"
master.livenessProbe.enabledBoolEnable liveness probe for the master.true
master.livenessProbe.initialDelaySecondsIntInitial delay for the master liveness probe.120
master.readinessProbe.enabledBoolEnable readiness probe for the master.true
master.readinessProbe.initialDelaySecondsIntInitial delay for the master readiness probe.30
master.service.typeStringService type for the master pod.ClusterIP
master.service.portIntPort exposed by the master service.3306

Slave Configuration

InputTypeDescriptionDefault
slave.replicasIntNumber of MariaDB slave replicas.1
slave.resources.requests.cpuStringCPU request for MariaDB slave pods."500m"
slave.resources.requests.memoryStringMemory request for MariaDB slave pods."256Mi"
slave.resources.limits.cpuStringCPU limit for MariaDB slave pods."1500m"
slave.resources.limits.memoryStringMemory limit for MariaDB slave pods."1Gi"
slave.persistence.sizeStringPersistent storage size for slaves."10Gi"
slave.livenessProbe.enabledBoolEnable liveness probe for the slave pods.true
slave.livenessProbe.initialDelaySecondsIntInitial delay for slave liveness probe.120
slave.readinessProbe.enabledBoolEnable readiness probe for the slave pods.true
slave.readinessProbe.initialDelaySecondsIntInitial delay for slave readiness probe.30
slave.service.typeStringService type for slave pods.ClusterIP
slave.service.portIntPort exposed by the slave service.3306

Example values.yaml

Terminal window
version: 10.3.22-debian-10-r27
replication:
enabled: true
master:
resources:
requests:
cpu: "500m"
memory: "256M"
limits:
cpu: "1500m"
memory: "1Gi"
persistence:
size: 10Gi
slave:
replicas: 1
resources:
requests:
cpu: "500m"
memory: "256M"
limits:
cpu: "1500m"
memory: "1Gi"
persistence:
size: 10Gi

Features

  • Deploy MariaDB master-slave architecture on Kubernetes.
  • Configurable master and slave resources and persistence.
  • Probes for liveness and readiness checks for health monitoring.
  • Master-slave replication with customizable credentials and scaling.
  • Customizable service types and ports for networking flexibility.

Pod Scheduling

nodeSelector, tolerations and affinity are passed straight through to the pod spec. All three are empty by default and render nothing, so leaving them unset changes nothing for an existing release.

They apply to both the master and the slave StatefulSet.

Together they place the workload on a dedicated node pool — the nodeSelector picks the pool, the toleration gets past its taint:

Terminal window
nodeSelector:
workload: stateful
tolerations:
- key: workload
operator: Equal
value: stateful
effect: NoSchedule

affinity takes a full Affinity object. Note that setting it replaces the chart’s default soft pod-anti-affinity (which spreads replicas across nodes) rather than merging with it — restate the anti-affinity alongside your own rules if you still want it.


Contributing

We welcome contributions to improve this Helm chart. Please refer to the CONTRIBUTING.md file for contribution guidelines.


Code of Conduct

To maintain a healthy and collaborative community, please adhere to our Code of Conduct.


License

This project is licensed under the LICENSE. Please review it for terms of use.


Connection Config

  • DB_DIALECT : Specifies the database dialect. Always set to “mariadb”
  • DB_USER: Username used to connect to the MariaDB database.
  • DB_PORT : Port number for the MariaDB server. Defaults to 3306.
  • DB_NAME : Name of the specific MariaDB database to connect to.
  • DB_HOST : Hostname or service name of the MariaDB server.
  • DB_PASSWORD : Password for DB_USER ,stored securely in Kubernetes secrets.

See it fire on your bill.

Connect an account read-only. The first findings land in minutes.

472 rule families across 353 resource types on 22 platforms. Every threshold, metric, and IAM action is documented on these pages before you grant anything.

472 rule families documented
353 resource types covered
read-only default access level
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·