apiVersion: v1
kind: Service
metadata:
  name: postgresql-db-svc
  namespace: main-namespace
spec:
  type: ClusterIP
  selector:
    app: postgresql-db
  ports:
    - name: postgres
      protocol: TCP
      port: 35432
      targetPort: 5432