mongo-k8s-sidecar icon indicating copy to clipboard operation
mongo-k8s-sidecar copied to clipboard

sidecar correctly does config on first mongo cluster only

Open aaronnewsome opened this issue 4 years ago • 2 comments

Hello everyone. I'm a bit new to kubernetes and I thought of using this to easily configure a mongodb cluster.

Using the stateful set example here:

https://github.com/cvallance/mongo-k8s-sidecar/blob/master/example/StatefulSet/mongo-statefulset.yaml

I was able to get it up and running. However, the sidecar only configures the 1st mongodb cluster correctly. If I bring up a 2nd or 3rd cluster, the sidecar does not configure them or init the cluster. On a 2nd cluster, I can open a shell, run mongo and also run rs.initiate to initialize the cluster.

I've already made a script that I can run manually that does the rs.initiate but I'd like to figure out why the sidecar won't configure 2nd and 3rd clusters. Any ideas?

Thanks in advance.

aaronnewsome avatar Feb 27 '20 16:02 aaronnewsome

Hello @aaronnewsome

Could you please share a script that can perform rs.initiate? I am also having a similar requirement.

ratnakarreddyg avatar Mar 22 '20 06:03 ratnakarreddyg

Yes I can share. I was teaching kubernetes to all the guys on my team. Everyone got their own copy of a 3 node mongoDB cluster. My script initialized all of the perfectly. I’ll find it and send it over.

On Mar 21, 2020, at 11:12 PM, ratnakar reddy [email protected] wrote:

 Hello @aaronnewsome

Could you please share a script that can perform rs.initiate? I am also having a similar requirement.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

aaronnewsome avatar Mar 22 '20 16:03 aaronnewsome