From 2bb5a881f18cd8e2fe6d46eff81ab03208463deb Mon Sep 17 00:00:00 2001 From: owen Date: Mon, 14 Apr 2025 20:19:43 +0800 Subject: [PATCH] 1 --- gp2504/kustomization.yaml | 1 + gp2504/patch/redis-service-nodeport_patch.yaml | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 gp2504/patch/redis-service-nodeport_patch.yaml diff --git a/gp2504/kustomization.yaml b/gp2504/kustomization.yaml index 197c78b..b60927e 100644 --- a/gp2504/kustomization.yaml +++ b/gp2504/kustomization.yaml @@ -9,6 +9,7 @@ resources: - market-service.yaml - ../base/projects/stock2 - ../base/redis + - ../base/redis-nodeport - ingress.yaml configMapGenerator: diff --git a/gp2504/patch/redis-service-nodeport_patch.yaml b/gp2504/patch/redis-service-nodeport_patch.yaml new file mode 100644 index 0000000..3065310 --- /dev/null +++ b/gp2504/patch/redis-service-nodeport_patch.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: redis-service-nodeport +spec: + type: NodePort # 或者 NodePort + ports: + - port: 6379 + targetPort: 6379 + nodePort: 32504 # 可选,如果不指定,Kubernetes 会自动分配 + selector: + app: redis \ No newline at end of file