Hello all,
I would like to use mongosync between 2 replicaset in a separated k8 cluster. I could run it in pod created a very simple docker image. I would like to add livenessProbe and readinessProbe, but since mongosync is listening on localhost and for probes it has to listen on 0.0.0.0
Do you have any idea?
Thanks
Balazs
I think you already solved this problem, since you asked it on September 2023.
Anyway, I solved by using socat to forward any requests come to 0.0.0.0:3000 to localhost, on the mongosync default port.
My dockerfile is similar to the following one:
RUN apt add socat
...
CMD ["/bin/sh", "-c", "mongosync & socat TCP-LISTEN:3000,fork TCP:127.0.0.1: 27182"]
```