apiVersion: v1
kind: Service
metadata:
  # name needs to be `redis` because of the `docker/example-voting-app-vote` and `docker/example-voting-app-worker`
  # `redis = Redis(host="redis", port=6379)`
  name: redis
  labels:
    app: voting-app-v1
    name: redis-service
spec:
  # ClusterIP type by default
  ports:
    - port: 6379  # targetPort is the same as port if not stated otherwise
  selector:
    name: redis-pod
