diff --git a/gp2502/kustomization.yaml b/gp2502/kustomization.yaml index 489da6a..681acda 100644 --- a/gp2502/kustomization.yaml +++ b/gp2502/kustomization.yaml @@ -7,6 +7,7 @@ resources: - api2-service.yaml - ../base/projects/stock2 - ../base/redis + - ../base/redis-nodeport - ingress.yaml configMapGenerator: @@ -26,4 +27,5 @@ patches: - path: patch/task-deployment_patch.yaml - path: patch/agent-deployment_patch.yaml - path: patch/h5-deployment_patch.yaml - - path: patch/admin-deployment_patch.yaml \ No newline at end of file + - path: patch/admin-deployment_patch.yaml + - path: patch/redis-service-nodeport_patch.yaml \ No newline at end of file diff --git a/gp2502/patch/redis-service-nodeport_patch.yaml b/gp2502/patch/redis-service-nodeport_patch.yaml new file mode 100644 index 0000000..7ea27cf --- /dev/null +++ b/gp2502/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: 32502 # 可选,如果不指定,Kubernetes 会自动分配 + selector: + app: redis \ No newline at end of file