# Headless service for stable DNS entries of StatefulSet members.
apiVersion: v1
kind: Service
metadata:
  name: mysql2
  labels:
    app: mysql2
spec:
  ports:
  - name: mysql
    port: 3306
  - name : cvdport
    port: 8400
    targetPort: 8400
  clusterIP: None
  selector:
    app: mysql2
---
# 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: mysql2-read
  labels:
    app: mysql2
spec:
  ports:
  - name: mysql
    port: 3306
  - name : cvdport
    port: 8400
    targetPort: 8400
  selector:
    app: mysql2

