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