Hi all,
I am trying to configure sharding on my mongodb cluster. I plan to have two or three shards.
I have understand that I have to add more replicas in the replsets section as the number of shards that I need.
However , there is another parameters under the sharding section: sharding.configrs.size , what value should I put on it then ? what is it for ?
I post here part of my config , thanks for your answer
lab-psmdb-db:
enabled: true
replsets:
- name: rs0
size: 3
antiAffinityTopologyKey: "kubernetes.io/hostname"
expose:
enabled: false
exposeType: ClusterIP
podDisruptionBudget:
maxUnavailable: 1
arbiter:
enabled: false
size: 0
antiAffinityTopologyKey: "kubernetes.io/hostname"
resources:
requests:
cpu: "500m"
memory: 1G
volumeSpec:
pvc:
resources:
requests:
storage: 5Gi
- name: rs1
size: 3
antiAffinityTopologyKey: "kubernetes.io/hostname"
expose:
enabled: false
exposeType: ClusterIP
podDisruptionBudget:
maxUnavailable: 1
arbiter:
enabled: false
size: 0
antiAffinityTopologyKey: "kubernetes.io/hostname"
resources:
requests:
cpu: "500m"
memory: 1G
volumeSpec:
pvc:
resources:
requests:
storage: 5Gi
sharding:
enabled: true
configrs:
size: 2
antiAffinityTopologyKey: "kubernetes.io/hostname"
configsvrReplSet:
size: 3
mongos:
size: 2
antiAffinityTopologyKey: "kubernetes.io/hostname"