How to Deploy MariaDB on Kubernetes Using StatefulSets and Persistent Storage
A technical guide published on DEV Community outlines the steps to run MariaDB, an open-source relational database, on a Kubernetes cluster. The setup covers creating a PersistentVolume and PersistentVolumeClaim for 10Gi of storage, configuring MariaDB via a ConfigMap, and deploying it as a StatefulSet for scalability. A Kubernetes Service exposes the database internally on port 3306, and the guide demonstrates scaling replicas up or down using kubectl. The author notes that each replica operates as an independent instance, and recommends MariaDB Galera or MaxScale for true multi-node replication. For production use, the guide advises replacing hostPath volumes with a CSI-backed StorageClass and adding readiness and liveness probes for improved reliability.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in