Run and operate MariaDB in a cloud native way. Declaratively manage your MariaDB using Kubernetes CRDs rather than imperative commands.
- Easily provision standalone MariaDB servers in Kubernetes.
- Multiple highly available topologies supported:
- Asynchronous replication ✨
- Synchronous multi-master via Galera
- MaxScale as database proxy to load balance requests and perform failover/switchover operations
- Flexible storage configuration. Volume expansion.
- Physical backups based on mariadb-backup and Kubernetes VolumeSnapshots.
- Logical backups based on mariadb-dump.
- Multiple backup storage types: S3 compatible, PVCs, Kubernetes volumes and
VolumeSnapshots. - Flexible backup configuration: scheduling, compression, retention policy, timeout, staging area...
- Target recovery time: restore the closest available backup to the specified time.
- Bootstrap new instances from: Physical backups, logical backups, S3, PVCs,
VolumeSnapshots... - Cluster-aware rolling update: roll out replica Pods one by one, wait for each of them to become ready, and then proceed with the primary Pod, using
ReplicasFirstPrimaryLast. - Manual update strategies:
OnDeleteandNever. - Automated data-plane updates.
- my.cnf change detection. Automatically trigger updates when my.cnf changes.
- Suspend operator reconciliation for maintenance operations.
- Issue, configure and rotate TLS certificates and CAs.
- Native integration with cert-manager. Automatically create
Certificateresources. - Prometheus metrics via mysqld-exporter and maxscale-exporter.
- Native integration with prometheus-operator. Automatically create
ServiceMonitorresources. - Declaratively manage SQL resources: users, grants and logical databases.
- Declaratively manage resources in external MariaDB instances.
- Configure connections for your applications.
- Orchestrate and schedule sql scripts.
- Validation webhooks to provide CRD immutability.
- Additional printer columns to report the current CRD status.
- CRDs designed according to the Kubernetes API conventions.
- Install it using helm, OLM or static manifests.
- Multiple deployment modes: cluster-wide and single namespace.
- Helm chart to deploy MariaDB clusters and its associated CRs.
- Multi-arch distroless image.
- GitOps friendly.
For the user manual, getting started, guides, and API reference, please see the 📚docs directory.
For example Custom Resources (CRs) demonstrating how to use the operator, refer to the 🛠️examples directory.
You can easily deploy the operator to your cluster by installing the mariadb-operator-crds and mariadb-operator Helm charts:
helm repo add mariadb-operator https://helm.mariadb.com/mariadb-operator
helm install mariadb-operator-crds mariadb-operator/mariadb-operator-crds
helm install mariadb-operator mariadb-operator/mariadb-operatorRefer to the helm documentation for further detail.
When upgrading from an older version of the operator, it’s important to understand how both operator and operand resources are affected. Ensure you read both the updates section of the helm docs, and the release notes for any additional version-specific steps that may be required. Do not attempt to skip intermediate version upgrades. Upgrade progressively through each version to the next.
The Openshift installation is managed separately in the mariadb-operator-helm repository, which contains a helm based operator that allows you to install mariadb-operator via OLM.
mariadb-operator is only compatible with official MariaDB images. Refer to the images documentation for further detail.
- MariaDB Community >= 10.6
- MaxScale >= 23.08
- Kubernetes >= 1.31
- OpenShift >= 4.18
This migration guide will streamline your onboarding process and assist you in migrating your data into a MariaDB instance running on Kubernetes.
You can embrace GitOps best practises by using this operator, just place your CRDs in a git repo and reconcile them with your favorite tool, see an example with flux:
Take a look at our roadmap and feel free to open an issue to suggest new features.
Please create a PR and add your company or project to our ADOPTERS.md file if you are using our project!
We welcome and encourage contributions to this project! Please check our contributing and development guides. PRs welcome!
- We Tested and Compared 6 Database Operators. The Results are In! - KubeCon EU, March 2024
- Get Started with MariaDB in Kubernetes and mariadb-operator - MariaDB Corporation blog, February 2024
- Run and operate MariaDB in Kubernetes with mariadb-operator - MariaDB Foundation blog, July 2023
- L'enfer des DB SQL sur Kubernetes face à la promesse des opérateurs - KCD France, March 2023
Join us on Slack: MariaDB Community Slack.