gpt4 book ai didi

mongodb - 如何增加或减少通过 Helm bitnami/mongodb分片部署的mongodb分片的数量?

转载 作者:行者123 更新时间:2023-12-02 12:29:07 27 4
gpt4 key购买 nike

我已经在kubernetes中部署了mongodb分片集群。
通过:helm install my-release bitnami/mongodb-sharded,默认功能为2个分片,每个分片只有1个副本。

它运行正常,但是现在我必须将碎片总数增加到4,并将每个碎片副本增加到3。任何想法如何做到这一点?

最佳答案

如果我没记错的话,可以使用命令行进行这些更改:
$ helm install my-release --set shards=4, configsvr.replicas=3 bitnami/mongodb-sharded
至于副本,这取决于您要扩展的范围,您可以从以下选项中进行选择:

configsvr.replicas

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



要么

mongos.replicas

Number of Mongos nodes to create



要么

shardsvr.dataNode.replicas

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



要么

shardsvr.arbiter.replicas

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



一切都在 Installing the Chart中描述

关于mongodb - 如何增加或减少通过 Helm bitnami/mongodb分片部署的mongodb分片的数量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60247183/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com