website/docs/tutorials/stateful-application/mysql-services.yaml

31 lines
530 B
YAML
Raw Normal View History

2016-11-29 18:04:17 +00:00
# Headless service for stable DNS entries of StatefulSet members.
2016-11-19 00:28:08 +00:00
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