AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

MongoDB 리소스에 대한 스토리지 옵션 구성

You can configure your MongoDB resources to bind to specific storage in your MongoDB CustomResourceDefinition. The persistence field in the MongoDB CustomResourceDefinition allows you to more precisely manage where Kubernetes stores the logs and metadata generated from MongoDB custom resources. Controlling log and metadata storage allows you to have more fine-grained control of processes that manage and interact with this generated metadata.

You can configure persistence settings per component in the MongoDB CustomResourceDefinition. These settings allow you to specify the relationship between a given component and one or more related PersistentVolume resources, which store output from your MongoDB custom resources.

persistence 설정은 Kubernetes 클러스터 에서 MongoDB 사용자 지정 리소스 관리 객체와 연결된 persistentVolumes 의 수와 저장 용량 을 지정합니다.

MongoDB deployment 에 대한 저장 옵션을 구성하려면 MongoDB Kubernetes Operator를 통해 배포된 MongoDB 복제본 세트 가 있거나 다음 전제 조건을 충족해야 합니다.

To create a single PersistentVolume in which a given component will store all MongoDB CustomResourceDefinition output, define the component's persistence as single. To create a distinct PersistentVolume for the component's data, journal, and logs, define the component's persistence as multiple.

1

다음 예시 와 같이 MongoDB CRD 정의의 persistence 섹션을 채웁니다.

1---
2apiVersion: mongodb.com/v1
3kind: MongoDB
4metadata:
5 name: my-sharded-cluster
6spec:
7 shardCount: 2
8 mongodsPerShardCount: 3
9 mongosCount: 2
10 configServerCount: 3
11 version: "8.0.0"
12 service: my-service
13 type: ShardedCluster
14
15 persistent: true
16
17 configSrvPodSpec:
18 persistence:
19 single: true
20
21 shardPodSpec:
22 persistence:
23 multiple:
24 # if the child of "multiple" is omitted then the default size will be used.
25 # 16GB for "data", 1GB for "journal", 3GB for "logs"
26 data:
27 storage: "20Gi"
28 storageClass: standard # You must define a storageClass, as the Operator creates a PVC, which will only create an associated PV with a backing storageClass.
29 logs:
30 storage: "4Gi"
31 storageClass: standard
32...
2
kubectl apply -f mongodb-crd.yaml
이 페이지 평가하기

이 페이지의 내용