1
votes

I have deployed mongodb sharded cluster in kubernetes. via: helm install my-release bitnami/mongodb-sharded with default features of 2 shards and only 1 replica per shard.

It is running fine but now I must increase the total number of shards to 4 and each shard replica to 3. Any idea how to do that?

2

2 Answers

0
votes

If I recall correctly you can make those changes using command line:

$ helm install my-release --set shards=4, configsvr.replicas=3 bitnami/mongodb-sharded

As for replicas it depends what exactly your want to scale, you can choose from following:

configsvr.replicas

Number of nodes in the replica set (the first node will be primary)

or

mongos.replicas

Number of Mongos nodes to create

or

shardsvr.dataNode.replicas

Number of nodes in each shard replica set (the first node will be primary)

or

shardsvr.arbiter.replicas

Number of arbiters in each shard replica set (the first node will be primary)

Everything is described in Installing the Chart

0
votes

$ helm upgrade my-release -f values.yaml bitnami/mongodb-sharded.

You do the changes in values.yaml like shards, configsvr.replicas if have already deployed the chart with default configuration. You are done.