원하는 구성에 맞게 복제본 세트 및 샤딩된 클러스터 배포를 확장하다 하거나 축소할 수 있습니다. 확장하면 배포서버 의 멤버 및/또는 샤드 수가 증가하여 배포의 중복성과 가용성이 향상됩니다. 배포서버 의 확장하다 해당 사용자 지정 리소스 에서 구성됩니다.
- 복제본 세트 확장
- To scale your replica set deployment, set the
spec.memberssetting to the desired number of replica set members. To learn more about replication, see Replication in the MongoDB manual. - 샤드 cluster 확장
샤드 cluster 배포를 확장하려면 다음 설정을 원하는 대로 설정합니다.
설정설명Number of shards in the sharded cluster.
샤드당 노드 수입니다.
샤드 라우터의 수.
Config 서버의 구성원 수입니다.
To learn more about sharded cluster configurations, see Sharded Cluster Components in the MongoDB manual.
고려 사항
절차
배포서버를 확장하려면 확장하려는 배포서버 구성에 따라 원하는 탭을 선택하세요.
1
spec.members 설정을 3 에서 4 로 조정합니다.
apiVersion: mongodb.com/v1 kind: MongoDB metadata: name: <my-replica-set> spec: members: 3 version: "8.0.0" opsManager: configMapRef: # Must match metadata.name in ConfigMap file name: <configMap.metadata.name> credentials: <mycredentials> type: ReplicaSet persistent: true ...
spec: members: 4
1
다음 설정을 원하는 값으로 조정합니다.
apiVersion: mongodb.com/v1 kind: MongoDB metadata: name: <my-secure-sharded-cluster> spec: shardCount: 3 mongodsPerShardCount: 3 mongosCount: 3 configServerCount: 4 version: "8.0.0" opsManager: configMapRef: name: <configMap.metadata.name> credentials: <mycredentials> type: ShardedCluster persistent: true ...
spec: shardCount: 3 mongodsPerShardCount: 3 mongosCount: 3 configServerCount: 4