apiVersion: v1
kind: Service
metadata:
  name: db  # name needs to be `db` because of the `docker/example-voting-app-worker`
  labels:
    app: voting-app-v1
    name: postgres-service
spec:
  # ClusterIP type by default
  ports:
    - port: 5432  # targetPort is the same as port if not stated otherwise
  selector:
    name: postgres-pod
