apiVersion: v1
kind: Service
metadata:
  name: postgres-db
  namespace: demo
  labels:
    app: postgres-db
spec:
  ports:
    - port: 5432
      name: postgres
  type: NodePort
  selector:
    app: postgres-db
