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
• 18,520 points
2,017 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
• 52,350 points

Related Questions In Kubernetes

0 votes
1 answer
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, 2019 in Kubernetes by Roshan
638 views
0 votes
2 answers

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

if u want to directly want to ...READ MORE

answered Jul 26, 2020 in Kubernetes by Akash Gupta
1,318 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17, 2019 in Others by anonymous
15,476 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,035 views
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
• 52,350 points
784 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
• 52,350 points
769 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP