Exposing replica set outside Kubernetes

I am using MongoDB Enterprise Operator for deploying MongoDB into Kubernetes. Till now I have successfully deployed the database but I am getting problems in exposing it outside kubernetes.

I am following this doc: Connect to a MongoDB Database Resource from Outside Kubernetes — MongoDB Kubernetes Operator 1.18
A/c to the doc, we have to expose each pod as NodePort and connect through replicaSetHorizons. But this requires that the k8s worker nodes have an external IP which is not available in my case.

Is there are other ways to expose the replicaset?

Thanks

Hello,

You can use a load-balancer service; one for each replicaset.

@Piyush_Kumar
there should be some way to expose each pod to the outside. May be continuing the idea of @Eric_Faure you can try creating a LB instance for each of the pod in the replica set?

@Anton_Lisovenko, can you please elaborate a bit more on what you mean by a load balancer for replica set ? Assume this is going to be a NLB/TCP and I think this is a very common scenario for prod deployments.

Any reason that this is not documented and provided in the current documentation ?

The official docs recommend the use of nodeports.