apiVersion: v1
kind: Service
metadata:
  namespace: postgres
  name: postgres
  labels:
    app: postgres

spec:
  ports:
    - name: "psql"
      protocol: "TCP"
      port: 5432
      targetPort: 5432

  selector:
    app: postgres