apiVersion: v1
kind: Service        
metadata:
  name: redis-discount-db # Name of the Kubernetes resource
  labels:            # This will match the pods to this service
    app: redis
    mservice: discount
    type: db
spec:
  type: ClusterIP  # ClusterIP is for internal communication only. You cannot access this from outside
  ports:
  - port: 6379       # Here we bind the ports to port of the service. Make sure the port is not utilized
    targetPort: 6379
  selector:          # Find pods with these labels and map them.
    app: redis
    mservice: discount
    type: db