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