apiVersion: v1
kind: Service
metadata:
  name: postgres-service-db
  labels:
    name: postgres-service
    app: myapp
spec:
  ports:
    - port: 5432
      targetPort: 5432
  selector:
    name: postgres-pod
    app: myapp