mariadb-operator

Create and manage MariaDB operator CRDs for Galera clusters, backups, and PITR on Kubernetes.

4|2|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/Aidas-dev/k8s-agent-skills --skill mariadb-operator-aidas-dev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mariadb-operator
Source: https://github.com/Aidas-dev/k8s-agent-skills/tree/main/skills/mariadb-operator
Command: npx skills add https://github.com/Aidas-dev/k8s-agent-skills --skill mariadb-operator-aidas-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing MariaDB on Kubernetes requires authoring many interdependent custom resources across 12 CRDs, and mistakes in Galera topology, backup retention, or image format versions cause outages or data loss. This Skill provides complete, version-accurate CRD references and working manifests so agents generate correct MariaDB operator resources on the first attempt. ## Core Features & Use Cases - Full CRD coverage: Documents all 12 CRDs under k8s.mariadb.com/v1alpha1 — MariaDB, MaxScale, Backup, PhysicalBackup, Restore, PointInTimeRecovery, Database, User, Grant, Connection, SqlJob, and ExternalMariaDB — with field tables and YAML examples. - HA and data protection patterns: Provides ready manifests for Galera clusters with automatic failover, MaxScale read/write splitting, scheduled S3/Azure backups, and point-in-time recovery to a target timestamp. - Version-aware guidance: Flags the v26.3.0 image format change (image.repository + image.tag) and v26.6.0 features like password rotation and cross-cluster replication. - Use Case: Ask the agent to deploy a 3-node Galera MariaDB cluster with hourly S3 backups, a MaxScale proxy, and an application database with user and grants — it produces the full multi-document YAML. ## Quick Start Ask the agent to create a MariaDB Galera cluster with three replicas, a scheduled S3 backup, and a Database, User, and Grant for your application.

Frequently Asked Questions about mariadb-operator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a MariaDB Galera cluster on Kubernetes with the operator?▼

Create a MariaDB CR with galera.enabled set to true, at least 3 replicas to avoid split-brain, and a storage size with a storageClassName. Set galera.primary.automaticFailover to true and provide a rootPasswordSecretKeyRef for credentials.

How do I schedule MariaDB backups to S3 with the operator?▼

Create a Backup CR referencing your MariaDB CR via mariaDbRef, set a cron schedule, and configure storage.s3 with bucket, endpoint, region, and credential secret refs. Use maxRetention as a Go duration like 720h to control cleanup.

What is the difference between Backup and PhysicalBackup in mariadb-operator?▼

Backup performs logical dumps while PhysicalBackup takes filesystem-level snapshots using mariadb-backup. PhysicalBackup restores faster and is recommended for databases larger than about 50GB.

Why does my MariaDB CR fail after upgrading the operator to v26.3.0?▼

Version 26.3.0 changed the image field from a single string to a split format. Replace image: mariadb:11.8 with image.repository: mariadb and image.tag: 11.8.8 in your MariaDB manifest.

Can the MariaDB operator do point-in-time recovery?▼

Yes, the PointInTimeRecovery CR restores to a specific RFC3339 timestamp using targetRecoveryTime, based on an existing Backup CR referenced via backupRef. The target MariaDB cluster is set with mariaDbRef.

Does mariadb-operator support connecting to external databases?▼

Yes, the ExternalMariaDB CR connects to out-of-cluster instances using host, port, credentials, and optional TLS CA refs. It can serve as a mariaDbRef target for MaxScale, Backup, and SqlJob resources.