diff --git a/base/mysql-lb/kustomization.yaml b/base/mysql-lb/kustomization.yaml new file mode 100644 index 0000000..bf45862 --- /dev/null +++ b/base/mysql-lb/kustomization.yaml @@ -0,0 +1,2 @@ +resources: + - mysql-service-lb.yaml \ No newline at end of file diff --git a/base/mysql/mysql-service-lb.yaml b/base/mysql-lb/mysql-service-lb.yaml similarity index 100% rename from base/mysql/mysql-service-lb.yaml rename to base/mysql-lb/mysql-service-lb.yaml diff --git a/base/mysql-nodeport/kustomization.yaml b/base/mysql-nodeport/kustomization.yaml new file mode 100644 index 0000000..074a54f --- /dev/null +++ b/base/mysql-nodeport/kustomization.yaml @@ -0,0 +1,2 @@ +resources: + - mysql-service-nodeport.yaml \ No newline at end of file diff --git a/base/mysql-nodeport/mysql-service-nodeport.yaml b/base/mysql-nodeport/mysql-service-nodeport.yaml new file mode 100644 index 0000000..c9ec215 --- /dev/null +++ b/base/mysql-nodeport/mysql-service-nodeport.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: mysql-service-nodeport +spec: + type: NodePort + selector: + app: mysql + ports: + - port: 3306 + targetPort: 3306 + nodePort: 30000 # 可选,如果不指定,Kubernetes 会自动分配 \ No newline at end of file diff --git a/base/mysql/kustomization.yaml b/base/mysql/kustomization.yaml index 0f98fb8..024da4e 100644 --- a/base/mysql/kustomization.yaml +++ b/base/mysql/kustomization.yaml @@ -1,4 +1,3 @@ resources: - mysql-statefulset.yaml - - mysql-service.yaml - - mysql-service-lb.yaml \ No newline at end of file + - mysql-service.yaml \ No newline at end of file diff --git a/base/redis-nodeport/kustomization.yaml b/base/redis-nodeport/kustomization.yaml new file mode 100644 index 0000000..9cf5f8e --- /dev/null +++ b/base/redis-nodeport/kustomization.yaml @@ -0,0 +1,2 @@ +resources: + - redis-service-nodeport.yaml \ No newline at end of file diff --git a/base/redis-nodeport/redis-service-nodeport.yaml b/base/redis-nodeport/redis-service-nodeport.yaml new file mode 100644 index 0000000..a1b4462 --- /dev/null +++ b/base/redis-nodeport/redis-service-nodeport.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: redis-service-nodeport +spec: + type: NodePort # 或者 NodePort + ports: + - port: 6379 + targetPort: 6379 + nodePort: 30001 # 可选,如果不指定,Kubernetes 会自动分配 + selector: + app: redis \ No newline at end of file diff --git a/gpdev/kustomization.yaml b/gpdev/kustomization.yaml index 502be7b..3c6e3c8 100644 --- a/gpdev/kustomization.yaml +++ b/gpdev/kustomization.yaml @@ -8,7 +8,8 @@ resources: - ../base/projects/stock2/pc - ../base/mysql - ../base/redis - - ../base/redis-lb + - ../base/mysql-nodeport + - ../base/redis-nodeport - ../base/phpmyadmin # - ../base/tls - ../base/updater