Code Capsules MySQL Operator¶
The Code Capsules MySQL Operator is a Kubernetes controller for running highly available MySQL clusters. You can declare clusters, users, and databases as custom resources; the operator handles replication, failover, and day-to-day operations.
This project is an independently maintained fork of the open-source bitpoke/mysql-operator. It does not track upstream Bitpoke releases, Helm charts, or documentation.
What you can do with this operator¶
- Deploy Percona Server for MySQL clusters (5.7, 8.0, and 8.4 LTS lines).
- Run multi-replica HA with automatic failover via Orchestrator.
- Manage users and databases declaratively with
MysqlUserandMysqlDatabaseresources. - Upgrade MySQL versions in a controlled way with operator orchestration (see MySQL versions & upgrades).
Built-in backup and restore features exist in the codebase but are not actively maintained for new deployments. See Legacy backups and the maintenance scope.
Quick start¶
Install the operator from versioned manifests:
export OPERATOR_VERSION=v0.7.0
kubectl create namespace mysql-operator --dry-run=client -o yaml | kubectl apply -f -
kubectl apply -k "deploy/manifests/${OPERATOR_VERSION}/crds"
kubectl apply -k "deploy/manifests/${OPERATOR_VERSION}/operator"
kubectl rollout status statefulset/mysql-operator -n mysql-operator
Deploy a sample cluster:
kubectl apply -f examples/example-cluster-secret.yaml
kubectl apply -f examples/example-cluster.yaml
For a full walkthrough, see Getting started.
Documentation map¶
| Topic | Page |
|---|---|
| First-time install and first cluster | Getting started |
| Operator install, customize, upgrade | Install the operator |
| Move off upstream Helm | Migrating from Helm |
MysqlCluster API reference |
MysqlCluster |
PVCs, mysqlConf, tuning |
Storage & configuration |
| Services and app connection strings | Connecting applications |
| MySQL 8.4 and version upgrades | MySQL versions & upgrades |
| Prometheus metrics | Monitoring |
Technology¶
Clusters use Percona Server for MySQL for operational features (XtraBackup tooling in sidecars, monitoring integration). Failover topology is managed by Percona Orchestrator, bundled in the operator StatefulSet.
License¶
Apache License 2.0. See LICENSE and NOTICE in the repository.