Cluster component
MOCO
Runs MySQL 8 databases with replicas and backups to S3.
- Memory when idle
- about 20 MiB
- CI measures it once the app is ready and before any traffic. Leave room for more.
- Tested on
- x86 and ARM servers
- Installed by default
- Optional
Introduction
MOCO runs MySQL from a MySQLCluster object: one instance, or a semi-synchronous primary with replicas. It backs up to S3 and restores to a point in time. Install it when applications need MySQL itself. The operator is Apache-2.0. The MySQL images it runs are GPL-2.0.
MOCO needs cert-manager for the webhook and for the mTLS between the controller and its agents. The install dialog adds cert-manager first when the cluster has none. The controller manages Pods, StatefulSets, Services, Secrets, PVCs, CronJobs, Jobs and Roles for MySQLCluster objects in every namespace, and it copies certificates into them.
Use it
In Zeabur OSS, open a project’s Add menu and choose MySQL. Set the version and storage, then connect services and set up S3 backups in the database’s Backups tab. See Create, back up, and restore databases.
Remove it
Removing MOCO removes the controller and its webhooks. Zeabur OSS refuses while MySQLCluster objects exist, so delete the databases you no longer need first, and back up the rest. The CRDs stay, and so do the PVCs of deleted databases. Delete them by hand when you no longer need the data. See Remove components.
Troubleshooting
A database never becomes Healthy
Check the object with kubectl -n <namespace> get mysqlcluster <name> and its Pods with kubectl -n <namespace> get pods. Read the controller’s logs with kubectl -n moco-system logs deploy/moco-controller.
The API server rejects a MySQLCluster object with a webhook error
Check that the controller runs with kubectl -n moco-system get pods, and that its certificates are ready with kubectl -n moco-system get certificate.
Technical details
This release
- Provides
- databases
- Licence
- Apache-2.0 AND GPL-2.0-only
- Homepage
- cybozu-go.github.io
- Source file
- components/moco/component.yaml @ v0.6.3
Tested in CI
CI installs these exact files on a new cluster, waits until they are ready, then records the idle memory.
| Distribution | Platform | Kubernetes | Passed | Idle memory |
|---|---|---|---|---|
| k3s | linux/amd64 | v1.37.2 | 22 MiB | |
| k3s | linux/arm64 | v1.37.2 | 21 MiB | |
| kind | linux/amd64 | v1.37.0 | 20 MiB | |
| kind | linux/arm64 | v1.37.0 | 20 MiB | |
| kubesolo | linux/amd64 | v1.36.6 | 19 MiB | |
| kubesolo | linux/arm64 | v1.36.6 | 19 MiB | |
| rke2 | linux/amd64 | v1.37.2 | 24 MiB | |
| rke2 | linux/arm64 | v1.37.2 | 23 MiB |
Security
Manages pods, StatefulSets, Services, Secrets, PVCs, CronJobs, Jobs and Roles for MySQLClusters in every namespace, and copies certificates into them.
What it installs
- moco 0.28.0
Needs
- any certificates component