apiVersion: v1
kind: Service
metadata:
  name:  postgres
  namespace: voting-app-stack
  labels:
    name: postgres-service
spec:
  type:  ClusterIP
  selector:
    name: postgres-pod
    type: postgres-db
  ports:
  - port:  5432
    targetPort:  5432