Details
-
Technical task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
1. Create headless service for writes within the cluster (port 3306) - service that is needed to retain unique identity of Statefulset. Normal service resolves DNS record to a single Cluster IP address of a Service, whereas for Headless service DNS record resolves to multiple IP of Pods.
2. Create service with other name on the same port to for read only (client service for reads)
Example of Service
apiVersion: v1
kind: Service
metadata:
name: mariadb-internal-service
spec:
selector:
app: mariadb
ports:
- protocol: TCP
port: 3306
targetPort: 3306