0

I am running a Kubernates Cluster in GCP. Each one of my clients/customer will need their own Kubernates Cluster.

Each Cluster/client needs to have their own database. What is the best way to go about this? I would like each cluster to have a MongoDB service so every pod in the cluster can communicate with the DB, but what is the correct way to do this? Create a pod running MongoDb with persistent storage on the node?

Create a replica set of mongoDB pods inside the cluster?

Have a single large MongoDB that each client's cluster can communicate with?

0

For running database service such as Mongodb, I would recommend to use Stateful Sets.

StatefulSets are intended to be used with stateful applications and distributed systems.

You can follow this nice tutorial to run stateful set Mongodb service on GKE and also it will be helpful to understand components, or you can use easily mongodb-replicaset helm chart on each of your cluster.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.