Documentation for docker deployment?

Hi,

I have PXC running on a docker swarm cluster and I’d like to add proxysql2 for read/write splitting. However I cannot find any documentation on this. In a perfect world, the proxysql container would be stateless but I have no idea where to start. Can I use environment var’s for this? If somebody can point me into the right direction that would be highly appreciated! Thanks

Hi @Bolk,
ProxySQL is configured via /etc/proxysql.cnf on first boot. ProxySQL has no knowledge of your environment on startup. You must configure knowledge of the PXC hosts, user accounts, and any routing rules. ProxySQL does not ‘auto discover’ anything about your network/topology.

I understand you said Docker Swarm, but have you considered (and I can’t believe I’m saying this…) Kubernetes? We have a native K8S operator for PXC that manages the pods, and manages ProxySQL as well.

Thanks Matthew, this helps. I agree that K8s is the way to go.

You might look at some more light-weight options like GitHub - k3s-io/k3s: Lightweight Kubernetes as K8S can be extremely overwhelming. Good Luck!

Yep thanks for the tip. I am running cluster based on k3s now.