apiVersion: v1
kind: Service
metadata:
  name: db-service
  labels:
    app: db-service
spec:
  type: NodePort
  selector:
    app: db
  ports:
    - protocol: TCP
      port: 5432
      targetPort: 5432
