I am trying to get access to the mongo cluster outside of kubernetes.
I have tried different variations of setting spec.replsets.expose to enabled: true and exposeType: NodePort as well as spec.sharding.mongos.expose.exposeType: NodePort
If I set both replsets and mongos to NodePort, the NodePort service is created for the rs0 nodes but the and for mongos creates and then is destroyed within about 25 seconds, and just repeats, each time with a new port. If I do this I am able to connect to each replica, but I was under the impression i should be connecting to the mongos service.
If I set only mongos to NodePort (and keep replsets to false/LoadBalancer) the rs0 cluster is Headless and the same behavior of mongos service creating with a port then destroying in 20ish seconds.
What is the correct way to expose the cluster via NodePort?