apiVersion: v1
kind: Service
metadata:
  name: redis-svc
  namespace: goms-ek8s
  labels:
    app: redis-svc
spec:
  type: NodePort
  ports:
  - port: 6379
    protocol: TCP
    targetPort: 6379
    nodePort: 32022
  selector:
    app: redis #选择 pod label