diff --git a/docs/tutorials/replicated-stateful-application/mysql-headless-service.yaml b/docs/tutorials/replicated-stateful-application/mysql-headless-service.yaml deleted file mode 100644 index 5f9fdcbc23..0000000000 --- a/docs/tutorials/replicated-stateful-application/mysql-headless-service.yaml +++ /dev/null @@ -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 - diff --git a/docs/tutorials/replicated-stateful-application/mysql-services.yaml b/docs/tutorials/replicated-stateful-application/mysql-services.yaml new file mode 100644 index 0000000000..ef68455396 --- /dev/null +++ b/docs/tutorials/replicated-stateful-application/mysql-services.yaml @@ -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 +