Run and operate MariaDB in a cloud native way. Declaratively manage your MariaDB using Kubernetes CRDs rather than imperative commands.
- Easily provision and configure MariaDB servers in Kubernetes.
- Multiple HA modes: Galera Cluster or MariaDB Replication.
- Automated Galera primary failover and cluster recovery.
- Advanced HA with MaxScale: a sophisticated database proxy, router, and load balancer for MariaDB.
- Flexible storage configuration. Volume expansion.
- Take, restore and schedule backups.
- Multiple backup storage types: S3 compatible, PVCs and Kubernetes volumes.
- Policy-driven backup retention with bzip and gzip compression options.
- Target recovery time: restore the closest available backup to the specified time.
- Bootstrap new instances from: Backups, S3, PVCs ...
- 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:
OnDelete
andNever
. - Automated data-plane updates.
- my.cnf change detection. Automatically trigger updates when my.cnf changes.
- Suspend operator reconciliation for maintenance operations.
- Prometheus metrics via mysqld-exporter and maxscale-exporter.
- Declaratively manage SQL resources: users, grants and logical databases.
- 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.
- Multi-arch distroless image.
- GitOps friendly.
Please, refer to the documentation, release notes, the API reference and the example suite for further detail, or dive into the quickstart.
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-operator
Refer 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.5
- MariaDB Enterprise >= 10.5
- MaxScale >= 23.08
- MaxScale >= 24.02
- Kubernetes >= 1.26
- OpenShift >= 1.13
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.