MongoDB Search enables full-text search capabilities in your Kubernetes environment by deploying the mongot process alongside your MongoDB database deployment (mongod). The mongot process manages search indexes, sources data from the database, and processes $search and $searchMeta queries. This eliminates the need to maintain separate search systems while providing advanced search features.
MongoDB Search를 배포하려면 Kubernetes 연산자가 실행하고 사용하여 mongot 팝을 배포하고 spec에 지정된 영구 저장을 요청하는 MongoDBSearch 사용자 지정 리소스(CR)를 적용합니다.
배포 절차에 대한 자세한 내용은 MongoDB Search 및 벡터 검색 배포를 참조하세요.
The mongot Process
각 mongot 프로세스 에는 데이터베이스 또는 다른 검색 노드와 공유되지 않는 자체 영구 볼륨이 있습니다. 저장소는 데이터베이스 에서 지속적으로 제공되는 데이터로 구축된 인덱스를 유지 관리하는 데 사용됩니다. 인덱스 정의(메타데이터)는 데이터베이스 자체에 저장됩니다.
mongot 는 다음 조치를 수행합니다.
인덱스 관리합니다.
mongot는 데이터베이스 의 인덱스 정의를 업데이트하는 역할을 합니다.데이터베이스 에서 데이터를 가져옵니다.
mongot노드는 데이터베이스 에서 실시간 인덱스를 업데이트 위해 데이터베이스 에 대한 영구 연결을 설정합니다.검색 쿼리를 처리합니다.
When
mongodreceives a$searchor$searchMetaquery, it directs the query to one of themongotnodes. Themongotthat receives the query processes the query, aggregates the data, and returns the results tomongod, which forwards the results to the user.
The mongot components are tightly coupled with a single MongoDB replica set and cannot be shared across multiple databases or replica sets. Each replica set deployment has its own dedicated search nodes. To learn more about Search node architecture, see Node Architecture in the MongoDB Search documentation.
Networking
mongot 와 mongod 간의 네트워크 연결은 양방향으로 진행됩니다.
mongot인덱스를 빌드하고 쿼리를 실행하는 데 사용되는 데이터를 소싱하기 위해 복제본 세트에 대한 연결을 설정합니다.mongodmongot에 연결하여 인덱스 관리 및 데이터 쿼리와 같은 검색 관련 작업을 전달합니다.
mongod 은 모든 검색 쿼리의 프록시 역할을 합니다. mongot과 직접 상호 작용하지 않습니다.
연산자 managed 배포서버
mongot 및 mongod 프로세스가 모두 Kubernetes 클러스터 내에 배포되면 Kubernetes 연산자는 두 프로세스에 대한 구성을 자동으로 수행합니다. 구체적으로 Kubernetes 연산자는 다음을 수행합니다.
Finds the MongoDB CR referenced by MongoDBSearch using
spec.source.mongodbResourceRef, or by a naming convention by looking for the MongoDB CR with the same name as MongoDBSearch.Generates
mongotconfiguration in a YAML file and saves it to a config map named<MongoDBSearch.metadata.name>-search-config.Deploys the MongoDB Search stateful set named
<MongoDBSearch.metadata.name>-searchwith storage and resource requirements configured according tospec.persistenceandspec.resourceRequirementsin the CR.mongot호스트의 호스트 이름 및 포트 번호를 포함하여 필요한setParameter옵션을 추가하여 모든mongod프로세스의 구성을 업데이트합니다.
외부 MongoDB 배포서버
MongoDB 복제본 세트가 Kubernetes 외부에 있는 경우 Kubernetes Operator를 사용하여 mongot 를 배포하고 일부 단계를 수동으로 수행합니다. Kubernetes Operator는 검색 팝의 구성을 처리하지만 MongoDB 노드와 네트워킹은 다시 구성해야 합니다.
보안
If the MongoDB server is inside the Kubernetes cluster, the Kubernetes Operator automatically sets up keyfile authentication for MongoDB Search. If the MongoDB server is external, you must create a Kubernetes Secret containing the replica set's keyfile credential and reference it in the MongoDBSearch CR.
제한 사항
다음 아키텍처에서는 MongoDB Search를 배포할 수 없습니다.
IBM Power (ppc64le)
IBM Z (s390x)
팁
MongoDB Search 및 벡터 검색 배포 — MongoDB Search 및 벡터 검색 배포
MongoDB Search 및 벡터 검색 설정 — MongoDBSearch CR 설정