apiVersion: v1
kind: Service
metadata:
  name: postgres-nodeport-service
spec:
  type: NodePort
  selector:
    component: database
  ports:
    - port: 5432
      targetPort: 5432
      nodePort: 30000