KubeBlocks
BlogsEnterprise
⌘K
​
Blogs
Open Source · Production-Grade · CNCF Landscape

KubeBlocks MySQL Operator for Kubernetes

Deploy production-grade MySQL clusters in minutes. Automate high availability, PITR backups, and zero-downtime upgrades.

Try Playground Free →Read the Docs

3

HA Topologies

0

Data Loss on Failover

99.99%

High Availability Target

100%

Open Source

Deploy MySQL in 3 steps

1

Install KubeBlocks

# Add Helm repo
helm repo add kubeblocks https://apecloud.github.io/helm-charts
helm repo update

# Install KubeBlocks
helm install kubeblocks kubeblocks/kubeblocks \
  --namespace kb-system --create-namespace
2

Create a MySQL Cluster

apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
  name: mysql-cluster
spec:
  terminationPolicy: Delete
  clusterDef: mysql
  topology: semisync  # or mgr
  componentSpecs:
    - name: mysql
      replicas: 3
3

Cluster is Ready

$ kubectl get cluster mysql-cluster
NAME            CLUSTER-DEF   TOPOLOGY    STATUS    AGE
mysql-cluster   mysql         semisync    Running   2m

Trusted by Engineering Teams at Scale

BONC CloudBONC Cloud
China Mobile CloudChina Mobile Cloud
China Telecom CloudChina Telecom Cloud
TencentTencent
XiaomiXiaomi
Ping AnPing An
VIP.comVIP.com
KwaiKwai
Tiger BrokersTiger Brokers
CITIC SecuritiesCITIC Securities
SealOSSealOS
FastGPTFastGPT
KubeSphereKubeSphere
MomentaMomenta
360360
TilaaTilaa
OlaresOlares
Changan AutomobileChangan Automobile
State GridState Grid
BONC CloudBONC Cloud
China Mobile CloudChina Mobile Cloud
China Telecom CloudChina Telecom Cloud
TencentTencent
XiaomiXiaomi
Ping AnPing An
VIP.comVIP.com
KwaiKwai
Tiger BrokersTiger Brokers
CITIC SecuritiesCITIC Securities
SealOSSealOS
FastGPTFastGPT
KubeSphereKubeSphere
MomentaMomenta
360360
TilaaTilaa
OlaresOlares
Changan AutomobileChangan Automobile
State GridState Grid
MySQL Topologies

Every MySQL Topology. One Operator.

From a lightweight dev instance to a production-grade Group Replication cluster — choose the topology that fits your workload.

One primary with one or more semi-synchronous replicas. At least one replica acknowledges each transaction before the primary commits, ensuring zero data loss on failover.

✓

Automatic primary election on failure

✓

Read scale-out via replicas

✓

Zero data loss — semi-sync ACK before commit

✓

Optional ProxySQL for read/write splitting

✓

Syncer sidecar manages role detection

RTO < 30s
RPO = 0
Read/Write Split via ProxySQL
Application / Client
via ProxySQL :6033 or direct :3306
K8s Service · ClusterIP
Kubernetes Services
Optional
mysql-cluster-proxysql
ClusterIP · :6033
selector: proxysql pods
ProxySQL
mysql-cluster-mysql
ClusterIP · :3306
selector: role=primary
MySQL Direct
→ proxysql pod
Optional
ProxySQL — Read/Write Splitting
⇄ :6033 MySQL
⚙ :6032 Admin
WRITEINSERT / UPDATE / DELETE → Primary only
READSELECT → Replicas (load balanced)
pod FQDN via headless service · :3306
Pods · Worker Nodes
mysql-0PRIMARY
🐬
mysql
:3306 · primary role
rw
🔍
syncer
role probe via syncerctl
📊
mysql-exporter
:9104 metrics
💾 PVC data-0 · 20Gi
mysql-1REPLICA
🐬
mysql
:3306 · replica role
ro
🔍
syncer
role probe via syncerctl
📊
mysql-exporter
:9104 metrics
💾 PVC data-1 · 20Gi
mysql-2REPLICA
🐬
mysql
:3306 · replica role
ro
🔍
syncer
role probe via syncerctl
📊
mysql-exporter
:9104 metrics
💾 PVC data-2 · 20Gi
↔Binlog Streaming (async / semi-sync replication)primary-0 → replica-1 · replica-2
ProxySQL (Optional)
Primary / Write
Replica / Read
Persistent Storage
Comparison

How KubeBlocks Compares to Other MySQL Operators

✓ = Supported · ~ = Partial / Limited · ✗ = Not supported

FeatureKubeBlocksOracle MySQL OperatorPercona OperatorBitpoke Operator
Open Source✓✓✓✓
Multi-engine (one operator)✓✗✗✗
SemiSync Replication✓✓~✓
Group Replication (MGR)✓✓~✗
Orchestrator HA✓✗✗✗
ProxySQL (read/write split)✓✗✓✓
PITR (binlog streaming)✓~✓~
Unified OpsRequest API✓✗✗✗
Dynamic config (no restart)✓~~~
Horizontal scaling OpsRequest✓~~✗
TLS in-place rotation✓~~~
Prometheus metrics✓✓✓✓

Based on publicly available documentation. Features may vary by version.

Capabilities

Built for Production MySQL

KubeBlocks automates the hardest parts of running MySQL on Kubernetes — so your team doesn't have to.

🗄️
Point-in-Time Recovery (PITR)
Continuous binlog streaming + scheduled full backups. Restore to any second in history.
RPO < 1 second
Backup Timeline
⟵ Continuous Binlog Stream ⟶
Full Backup
00:00
Incremental
06:00
Full Backup
12:00
Incremental
18:00
🎯 Restore Target
21:37:42
📦
1. Load Base BackupRestore nearest full snapshot before target time
→
📜
2. Replay BinlogsApply all transactions up to 21:37:42
→
✅
3. Cluster ReadyNew MySQL cluster restored to exact point in time
✓ Zero Data Loss
Performance

Kubernetes Doesn't Mean Performance Penalty

Our benchmark shows KubeBlocks-managed MySQL on Kubernetes delivers performance on par with — or better than — Amazon RDS.

≈ RDS

Throughput (TPS)

KubeBlocks MySQL achieves comparable TPS to Amazon RDS MySQL under equivalent hardware configurations.

-25%

P99 Latency vs. Amazon RDS

In IO-bound write-intensive workloads (8C32GB / 3,000 IOPS), KubeBlocks achieves 25% lower P99 latency than RDS — driven by a 2G redo log capacity default vs. RDS's 100M.

0

Kubernetes Performance Tax

With proper parameter tuning and IOPS, running MySQL on Kubernetes introduces no performance degradation vs. bare-EC2 deployments.

Read Full Benchmark Report →
Day-2 Operations

Every Operation Declared as a Kubernetes Resource

No SSH into pods, no shell scripts. Submit an OpsRequest and KubeBlocks handles the rest.

High Availability & Scaling

✓

Horizontal Scaling

Add or remove replicas online without downtime or reconfiguration.

✓

Vertical Scaling

Resize CPU and memory on running instances with a rolling strategy.

✓

Volume Expansion

Expand PVC storage without pod restarts on supported storage classes.

✓

Rolling Restart

Controlled pod restarts with zero traffic disruption.

✓

Planned Switchover

Promote a specific replica to primary with zero data loss.

✓

Stop / Start

Suspend clusters to eliminate compute cost; resume with full state.

Configuration, Security & Observability

✓

Dynamic Configuration

Tune MySQL parameters via OpsRequest — no restart for supported vars.

✓

TLS Encryption

Enable, rotate, or disable in-flight encryption without downtime.

✓

Password Management

Rotate root and custom account credentials stored in Kubernetes Secrets.

✓

Minor Version Upgrade

Rolling upgrades across minor MySQL versions with health checks.

✓

Prometheus Metrics

Per-instance metrics via mysqld_exporter on :9104, Grafana dashboards included.

✓

Audit Logging

Centralized query audit trail via Loki Stack for compliance requirements.

Get Started

Get Started with KubeBlocks MySQL Operator, Risk-Free.

Open source and production-ready. Enterprise customers get dedicated onboarding, migration support, and SLA guarantees.

Try Playground Free →Talk to the Team
✓Open Source
✓MySQL + 35 other engines
✓Production-grade HA
✓No vendor lock-in

© 2026 KUBEBLOCKS INC