Skip to content

Instantly share code, notes, and snippets.

@jimi-c
Created September 27, 2018 12:45
Show Gist options
  • Save jimi-c/d6d091a452c2c41f26864468b53a8ae6 to your computer and use it in GitHub Desktop.
Save jimi-c/d6d091a452c2c41f26864468b53a8ae6 to your computer and use it in GitHub Desktop.
commit 03c6b73e84ec1550c0be800d841af62df0ba1459 (HEAD -> master, upstream/master)
Author: James Cammarata <[email protected]>
Date: Thu Sep 27 00:38:18 2018 -0500
Adding haproxy load balancer for the mysql cluster
This proxy is available via a NodePort service, which can be accessed
from minikube with the `minikube service galera-haproxy-service --url`
command.
[jamesc@jimi galera-operator]$ mysql -u root -h $(minikube ip) -P $(minikube service galera-haproxy-service --format '{{.Port}}') -e "show status like 'wsrep_gcomm_uuid'; show tables;" testing
+------------------+--------------------------------------+
| Variable_name | Value |
+------------------+--------------------------------------+
| wsrep_gcomm_uuid | a87b1c54-c20e-11e8-8e97-0e64fce4c988 |
+------------------+--------------------------------------+
+-------------------+
| Tables_in_testing |
+-------------------+
| test |
+-------------------+
[jamesc@jimi galera-operator]$ mysql -u root -h $(minikube ip) -P $(minikube service galera-haproxy-service --format '{{.Port}}') -e "show status like 'wsrep_gcomm_uuid'; show tables;" testing
+------------------+--------------------------------------+
| Variable_name | Value |
+------------------+--------------------------------------+
| wsrep_gcomm_uuid | 53d2d186-c20e-11e8-8d80-fe3a169414fb |
+------------------+--------------------------------------+
+-------------------+
| Tables_in_testing |
+-------------------+
| test |
+-------------------+
[jamesc@jimi galera-operator]$ mysql -u root -h $(minikube ip) -P $(minikube service galera-haproxy-service --format '{{.Port}}') -e "show status like 'wsrep_gcomm_uuid'; show tables;" testing
+------------------+--------------------------------------+
| Variable_name | Value |
+------------------+--------------------------------------+
| wsrep_gcomm_uuid | 603f194f-c20e-11e8-af4b-3f2738aa0c5a |
+------------------+--------------------------------------+
+-------------------+
| Tables_in_testing |
+-------------------+
| test |
+-------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment