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,070 points
751 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
• 51,890 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
84 views
0 votes
2 answers
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, 2019 in Others by anonymous
7,554 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 11, 2019 in Kubernetes by Kalgi
• 51,890 points

reshown Apr 12, 2019 by Kalgi 2,217 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
• 51,890 points
118 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
• 51,890 points
126 views