An open API service indexing awesome lists of open source software.

https://github.com/ganochenkodg/qdrant-operator

Kubernetes operator for Qdrant
https://github.com/ganochenkodg/qdrant-operator

database kubernetes neural-network neural-search operator question-answering rag search-engine similarity-search vector-database

Last synced: about 2 months ago
JSON representation

Kubernetes operator for Qdrant

Awesome Lists containing this project

README

          



Kubernetes operator for the Qdrant Vector Database.


Key Features
Installation
Quickstart
Security
Backups
Documentation
Demo application

![screenshot](resources/qdrant-operator.gif)

## 🎯 Key features

The operator provides the following functionality:

- Creation of single-node and multi-node Qdrant clusters, cluster scaling.
- Authentication support in the cluster using API keys with read-write and read-only permissions. Auto-generated and user-provided keys are supported.
- TLS Encryption support for connections, both for client and peer-to-peer communication. Auto-generated and user-provided certificates are supported.
- Support for setting custom Qdrant parameters.
- Support for setting various scheduling options for the cluster (tolerations, affinities, topology spread).
- Management of Qdrant collections, including configuration of replication, sharding, indexing, quantization, etc.
- The operator works in cluster mode with leader elections, ensuring high availability.
- The operator allows to create instant and scheduled snapshots and store them in any S3-compatible storage.

### 🔨 Installation

To run the operator you need Kubernetes version 1.26+.

The operator includes two custom resources - `QdrantCluster` and `QdrantCollection`. Install the CRDs by running the commands below:

```bash
kubectl apply -f https://raw.githubusercontent.com/ganochenkodg/qdrant-operator/main/deploy/crds/crd-qdrantcluster.yaml
kubectl apply -f https://raw.githubusercontent.com/ganochenkodg/qdrant-operator/main/deploy/crds/crd-qdrantcollection.yaml
```

You will see the next output:

```console
customresourcedefinition.apiextensions.k8s.io/qdrantclusters.qdrant.operator created
customresourcedefinition.apiextensions.k8s.io/qdrantcollections.qdrant.operator created
```

Install the operator by running the command below:

```bash
kubectl apply -f https://raw.githubusercontent.com/ganochenkodg/qdrant-operator/main/deploy/operator.yaml
```

```console
namespace/qdrant-operator created
serviceaccount/qdrant-operator-sa created
clusterrole.rbac.authorization.k8s.io/qdrant-operator-role created
clusterrolebinding.rbac.authorization.k8s.io/qdrant-operator-rolebinding created
configmap/qdrant-operator-config created
deployment.apps/qdrant-operator created
```

Wait for operator's readiness:

```bash
kubectl wait pods -l app=qdrant-operator --for condition=Ready --timeout=300s -n qdrant-operator
```

And check operator's logs to ensure it is working:

```bash
kubectl logs deploy/qdrant-operator -n qdrant-operator
```

```console
Found 3 pods, using pod/qdrant-operator-6577f85799-ggkgm
1/14/2024, 3:58:40 PM: Debug mode ON!
1/14/2024, 3:58:40 PM: Status of "qdrant-operator-6577f85799-ggkgm": FOLLOWER. Trying to get leader status...
1/14/2024, 3:58:41 PM: Status of "qdrant-operator-6577f85799-ggkgm": LEADER.
1/14/2024, 3:58:41 PM: Watching QdrantClusters API.
1/14/2024, 3:58:41 PM: Watching QdrantCollections API.
```

### ⚡ Quickstart

Deploy your first Qdrant cluster by applying the minimal QdrantCluster custom resource:

```bash
cat <