apiVersion: v1
kind: Service
metadata:
  labels:
    app: mongodb
  name: mongodb
spec:
  type: ClusterIP
  ports:
    - name: tcp
      port: 27017
      targetPort: 27017
      protocol: TCP
  selector:
    app: mongodb