apiVersion: v1
kind: Service
metadata:
  name: postgres-service
  labels:
    app: my-voting-app
    tier: postgres-service
spec:
  ports:
    - port: 5432
      targetPort: 5432
  selector:
    app: my-voting-app
    tier: postgres