How do you set-up Mongo replica set on Kubernetes?

0 votes
I'm trying to set up a Mango replica on kubernetes. I need 4 replicas. How do i do this?
Aug 30, 2018 in Kubernetes by Hannah
• 16,210 points
307 views

1 answer to this question.

0 votes

Follow these steps

To create a Kubernetes 1.5 cluster, run the following command:

gcloud container clusters create "test-cluster"

Then, authenticate into the cluster:

gcloud container clusters get-credentials test-cluster
To set up MangoDB replica set
git clone https://github.com/thesandlord/mongo-k8s-sidecar.git
cd /mongo-k8s-sidecar/example/StatefulSet/

To create the MongoDB replica set, run these two commands:

kubectl apply -f googlecloud\_ssd.yaml
kubectl apply -f mongo-statefulset.yaml
answered Aug 30, 2018 by Kalgi
• 41,990 points

Related Questions In Kubernetes

0 votes
1 answer
0 votes
1 answer

How do I set up a k8s cluster on windows?

Hey @Nadia, follow these steps to create ...READ MORE

answered Feb 25 in Kubernetes by Roshan
39 views
0 votes
1 answer

How can I access a service installed on Kubernetes from anywhere?

I have followed the link which you have ...READ MORE

answered Jul 23, 2018 in Kubernetes by Atul
• 10,240 points
152 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
2,936 views
+3 votes
1 answer
0 votes
1 answer

Set up kubernetes cluster on ubuntu

Do kubeadm reset and start all over ...READ MORE

answered Oct 5, 2018 in Kubernetes by Kalgi
• 41,990 points
57 views
0 votes
1 answer

How do I run kubernetes on AWS

There are two main ways to use ...READ MORE

answered Oct 26, 2018 in Kubernetes by Kalgi
• 41,990 points
65 views