There are plenty of ways to run ProxySQL in Kubernetes (K8S). For
example, we can deploy sidecar containers on the application
pods, or run a dedicated ProxySQL service with its own pods.
We are going to discuss the latter approach, which is more likely
to be used when dealing with a large number of application pods.
Remember each ProxySQL instance runs a number of checks against
the database backends. These checks monitor things like
server-status and replication lag. Having too many proxies can
cause significant overhead.
Creating a Cluster
For the purpose of this example, I am going to deploy a test
cluster in GKE. We need to follow these steps:
1. Create a cluster
gcloud container clusters create ivan-cluster --preemptible --project my-project --zone us-central1-c --machine-type n2-standard-4 --num-nodes=3
2. Configure command-line access
gcloud …
[Read more]