Add MySQL client service for reads.

This commit is contained in:
Anthony Yeh 2016-11-18 16:28:08 -08:00
parent 5e4b37e072
commit b92c2de265
2 changed files with 30 additions and 14 deletions

View File

@ -1,14 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: mysql
labels:
app: mysql
spec:
ports:
- name: mysql
port: 3306
clusterIP: None
selector:
app: mysql

View File

@ -0,0 +1,30 @@
# Headless service for stable DNS entries of Stateful Set members.
apiVersion: v1
kind: Service
metadata:
name: mysql
labels:
app: mysql
spec:
ports:
- name: mysql
port: 3306
clusterIP: None
selector:
app: mysql
---
# Client service for connecting to any MySQL instance for reads.
# For writes, you must instead connect to the master: mysql-0.mysql.
apiVersion: v1
kind: Service
metadata:
name: mysql-read
labels:
app: mysql
spec:
ports:
- name: mysql
port: 3306
selector:
app: mysql