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,002 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
634 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,306 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,446 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,350 points

reshown Apr 12, 2019 by Kalgi 7,086 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
778 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
764 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