apiVersion: v1
kind: Service
metadata:
  name: postgres-service
  labels:
    app: postgres
spec:
   ports:
   - nodePort: 32345
     port: 5432
     protocol: TCP
     targetPort: 5432
   selector:
     app: postgres
   type: NodePort