From 1494fd2160dcbd6592d4832e6c51d268ff966200 Mon Sep 17 00:00:00 2001 From: Arnob kumar saha Date: Tue, 26 Sep 2023 15:29:23 +0600 Subject: [PATCH 1/2] Mongo configServer should have at least 3 repliacs Signed-off-by: Arnob kumar saha --- docs/addons/mongodb/sharding/index.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/addons/mongodb/sharding/index.md b/docs/addons/mongodb/sharding/index.md index ec9ee927..4712db80 100644 --- a/docs/addons/mongodb/sharding/index.md +++ b/docs/addons/mongodb/sharding/index.md @@ -90,6 +90,9 @@ $ kubectl apply -f https://github.com/stashed/docs/raw/{{< param "info.version" mongodb.kubedb.com/sample-mgo-sh created ``` +According to MongoDB [docs](https://www.mongodb.com/docs/manual/core/replica-set-members/#replica-set-members), we should always have at least 3 replicas in the replicaSet. +As one secondary gets locked while running mongodump utility, This is a must, in case of configServer while taking backup. There can be various issues like sharding commands get stucked, primary-secondary syncing issue etc. if you don't specify >= 3 replicas in `.spec.shardTopology.configServer.replicas` field. + KubeDB will deploy a MongoDB database according to the above specification. It will also create the necessary secrets and services to access the database. Let's check if the database is ready to use, From 9f34ea0ed0bd8b72648fbd90b2529beec3844bed Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Tue, 26 Sep 2023 14:57:58 -0700 Subject: [PATCH 2/2] update Signed-off-by: Tamal Saha --- docs/addons/mongodb/sharding/index.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/addons/mongodb/sharding/index.md b/docs/addons/mongodb/sharding/index.md index 4712db80..e5c1783a 100644 --- a/docs/addons/mongodb/sharding/index.md +++ b/docs/addons/mongodb/sharding/index.md @@ -90,8 +90,7 @@ $ kubectl apply -f https://github.com/stashed/docs/raw/{{< param "info.version" mongodb.kubedb.com/sample-mgo-sh created ``` -According to MongoDB [docs](https://www.mongodb.com/docs/manual/core/replica-set-members/#replica-set-members), we should always have at least 3 replicas in the replicaSet. -As one secondary gets locked while running mongodump utility, This is a must, in case of configServer while taking backup. There can be various issues like sharding commands get stucked, primary-secondary syncing issue etc. if you don't specify >= 3 replicas in `.spec.shardTopology.configServer.replicas` field. +MongoDB [recommends](https://www.mongodb.com/docs/manual/core/replica-set-members/#replica-set-members) that there should be at least 3 replicas for a replicaSet configuration. For a sharded MongoDB setup, a secondary configserver is locked while running `mongodump` utility for backup. This can result in various issues like sharding commands get stucked, primary-secondary syncing issue etc. So, ensure at least 3 configServer replicas by specifying >= 3 replicas in `.spec.shardTopology.configServer.replicas` field. KubeDB will deploy a MongoDB database according to the above specification. It will also create the necessary secrets and services to access the database.