From 2c5721d5cffba004b68f1630ad97418b5cd86541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Sat, 2 Sep 2023 11:00:30 +0300 Subject: [PATCH] mysql-clusters: Fix external cluster --- mysql-clusters/external.yaml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/mysql-clusters/external.yaml b/mysql-clusters/external.yaml index 43af6e2..ff39dba 100644 --- a/mysql-clusters/external.yaml +++ b/mysql-clusters/external.yaml @@ -11,12 +11,30 @@ spec: --- apiVersion: v1 kind: Service +metadata: + name: primary-external +spec: + clusterIP: None +--- +apiVersion: v1 +kind: Service metadata: name: external spec: - type: ExternalName - externalName: 172.20.36.1 - ports: - - name: mysql - port: 3306 - protocol: TCP + clusterIP: None +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: primary-external +subsets: + - addresses: + - ip: 172.20.36.1 +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: external +subsets: + - addresses: + - ip: 172.20.36.1