apiVersion: v1
kind: Service
metadata:
  name: mongodb
  labels:
    app.kubernetes.io/name: mongodb
spec:
  ports:
    - name: mongo
      port: 27017
      targetPort: mongo
      protocol: TCP
  selector:
    app.kubernetes.io/name: mongodb