Atlas Kubernetes Operator supports Atlas Vector Search indexes on Atlas clusters. To learn more, see How to Index Fields for Vector Search.
전제 조건
Atlas Kubernetes Operator를 배포하여 Kubernetes 클러스터 실행.
모든 클러스터 계층 에서 MongoDB 버전
6.0.11,7.0.2이상.참고
다음을 초과하여 만들 수 없습니다.
M0클러스터의 인덱스 3개.Flex 클러스터의 인덱스 10개.
M10+클러스터에 생성할 수 있는 색인 수에는 제한이 없습니다.Atlas Vector Search 인덱스 를 생성할 컬렉션입니다.
필요한 액세스 권한
You need the Project Data Access Admin or higher role to create and manage Atlas Vector Search indexes.
절차
AtlasDeployment 사용자 정의 리소스를 구성합니다.
spec.deploymentSpec.searchIndexes 구성 객체.
이 객체에는 다음 매개변수가 적용됩니다.
Parameter | 설명 |
|---|---|
| 하나 이상의 Atlas Search 인덱스가 있는 컬렉션이 포함된 기존 데이터베이스를 식별하는 사람이 읽을 수 있는 레이블입니다. 중요: 지정하는 데이터베이스 가 이미 존재해야 합니다. 기존 데이터베이스 가 없는 경우 데이터베이스를 만듭니다. |
| 1개 이상의 Atlas Search 인덱스가 포함된 컬렉션을 식별하는 사람이 읽을 수 있는 라벨입니다. |
| 인덱스의 유형입니다. Atlas에서 허용하는 값은 다음과 같습니다.
|
사용 가능한 매개변수에 대해 자세히 알아보려면 AtlasDeployment 사용자정의 리소스를 참조하세요.
예시:
다음 명령을 실행합니다.
cat <<EOF | kubectl apply -f - apiVersion: atlas.mongodb.com/v1 kind: AtlasDeployment metadata: name: my-atlas-cluster namespace: mongodb-atlas-system spec: projectRef: name: my-project deploymentSpec: backupEnabled: true clusterType: REPLICASET name: Test-cluster-M10 replicationSpecs: - regionConfigs: - backingProviderName: AWS electableSpecs: instanceSize: M10 nodeCount: 3 priority: 7 providerName: AWS regionName: US_EAST_1 zoneName: Zone 1 searchIndexes: - DBName: sample_airbnb collectionName: listingsAndReviews name: my-index vectorSearch: fields: | [ {"my-field":{"type": "vector", { ...}, ] type: vectorSearch terminationProtectionEnabled: false EOF