How to run multiple instances of MySQL in kubernetes

Hi Team,

we are trying to setup mysql server with below configurations.

3 mysql pods with sharing same persistence volume and data should be available across all pods and any pods can execute read and write requests and a load balancer to route the traffic to different pods based on load.
Hope service will take care to route the traffic.
I tried master and salve method here master is only suitable for write and slave for read.
Can anyone explain which method is suitable to suite my requirements.

Regardless of containers or VMs, I don’t think MySQL has a solution for sharing the same disk between multiple nodes. It’s not like MSSQL where you can have a shared disk.

The only options are master/slave or maybe something like Galera Clustering which supports active/active access and data is replicated to all nodes. Not sure if anyone has tried Galera clustering with Kubernetes though.

Kind regards,
Stephen

Woud vitess suite your need? it’s essentially a horizontally scalable instance of mysql.