Skip to main content

Qdrant Provider

Manage Qdrant vector database deployments and collections through the Pragmatiks platform. Deploy self-hosted Qdrant instances to any Kubernetes cluster, or manage collections on existing Qdrant Cloud or local instances.

Resources

Resource Type Slug Description
Database qdrant/database Self-hosted Qdrant deployment with persistent storage and LoadBalancer access
Collection qdrant/collection Vector collection for similarity search on any Qdrant instance

Prerequisites

  • For Database resources: A kubernetes/config resource pointing at the target cluster. The cluster must support LoadBalancer services for external access.
  • For Collection resources: A running Qdrant instance -- either a Database resource from this provider, a Qdrant Cloud cluster, or any self-hosted Qdrant server accessible via HTTP.
  • API key (optional): Required for Qdrant Cloud. For self-hosted, can be generated automatically or provided explicitly.

Installation

pragma providers install qdrant

Database (qdrant/database)

Deploys a Qdrant vector database to a Kubernetes cluster as a StatefulSet with persistent storage. Creates a headless Service for pod DNS, a StatefulSet with configurable replicas and storage, and a LoadBalancer Service for external HTTP and gRPC access.

Config:

Field Type Required Mutable Default Description
config dependency yes no -- kubernetes/config resource for cluster access
replicas int no yes 1 Number of Qdrant StatefulSet pods
image string no yes "qdrant/qdrant:latest" Qdrant Docker image
api_key string no yes -- Explicit API key for authentication (mutually exclusive with generate_api_key)
generate_api_key bool no yes false Generate a secure 32-character hex API key
storage object no yes -- Persistent volume configuration (see below)
resources object no yes -- CPU and memory limits (see below)

StorageConfig:

Field Type Default Description
size string "10Gi" Persistent volume size
class string "standard-rwo" Kubernetes storage class name

ResourceConfig:

Field Type Default Description
memory string "2Gi" Memory limit for each Qdrant pod
cpu string "1" CPU limit for each Qdrant pod

Outputs: url, grpc_url, api_key

Example:

resources:
  - name: my-qdrant
    provider: qdrant
    type: database
    config:
      config:
        $ref: my-kubernetes-config
      replicas: 1
      generate_api_key: true
      storage:
        size: 20Gi
        class: premium-rwo
      resources:
        memory: 4Gi
        cpu: "2"

Behavior:

  • Create: Deploys headless Service, StatefulSet, and LoadBalancer Service sequentially. Waits for each to be ready and for the LoadBalancer to receive an external IP, up to 19 minutes in total.
  • Update: Reapplies all child Kubernetes resources with the full configuration, waiting for the StatefulSet only when its settings changed, then reapplies the LoadBalancer Service. The config dependency is immutable; changing it requires delete and recreate.
  • Delete: Explicitly deletes child Kubernetes resources (LoadBalancer Service, StatefulSet, headless Service). The stored vectors live on the StatefulSet's PersistentVolumeClaims; whether they are deleted with the StatefulSet follows the kubernetes provider's StatefulSet.
  • Health: Delegates to the underlying StatefulSet health check.
  • Logs: Streams pod logs from the underlying StatefulSet.

Collection (qdrant/collection)

Manages a vector collection on any Qdrant instance for similarity search. Works with Qdrant Cloud (with API key), self-hosted instances, or Database resources from this provider.

Config:

Field Type Required Mutable Default Description
url string no no "http://localhost:6333" Qdrant server URL (immutable)
api_key string no yes -- API key for Qdrant Cloud or secured instances
name string yes no -- Collection name within Qdrant (immutable)
vectors object yes no -- Vector configuration (immutable, see below)
on_disk bool no yes false Store vectors on disk instead of in memory

VectorConfig:

Field Type Default Description
size int -- Vector dimension (must match your embedding model output)
distance string "Cosine" Distance metric: Cosine, Euclid, or Dot

Outputs: name

Example (Qdrant Cloud):

resources:
  - name: company-docs
    provider: qdrant
    type: collection
    config:
      url: https://xyz-abc.eu-central.aws.cloud.qdrant.io:6333
      api_key:
        $ref: qdrant-api-key
      name: company-docs
      vectors:
        size: 1536
        distance: Cosine
      on_disk: true

Example (self-hosted via Database resource):

resources:
  - name: embeddings
    provider: qdrant
    type: collection
    config:
      url: ${{ my-qdrant.outputs.url }}
      api_key: ${{ my-qdrant.outputs.api_key }}
      name: embeddings
      vectors:
        size: 768
        distance: Cosine

Behavior:

  • Create: Creates the collection if it does not already exist. Idempotent -- if the collection exists, leaves it as is.
  • Observe: Reports the collection present when the server has a collection with the configured name.
  • Update: Applies on_disk to the live collection in place, keeping its vectors. Fails if the live vector size or distance differs from the config. Vector configuration, collection name and server URL changes are not allowed; changing them requires delete and recreate.
  • Delete: Deletes the collection and all its vectors. Idempotent -- succeeds if the collection does not exist.
  • Health: Reads the live collection status. Green is healthy, yellow and grey are degraded, red or a missing collection is unhealthy. Details carry the point, indexed vector and segment counts.

Common Patterns

Knowledge Base with Embeddings

Deploy a Qdrant database and create collections for a RAG pipeline:

resources:
  # 1. GKE cluster (from GCP provider)
  - name: my-cluster
    provider: gcp
    type: gke
    config:
      project_id: my-project
      location: europe-west4
      name: my-cluster
      credentials:
        $ref: gcp-credentials

  # 2. Kubernetes config authenticating against the GKE cluster
  - name: my-kubernetes-config
    provider: kubernetes
    type: config
    config:
      mode: gke_cluster
      cluster:
        $ref: my-cluster

  # 3. Self-hosted Qdrant database
  - name: vector-db
    provider: qdrant
    type: database
    config:
      config:
        $ref: my-kubernetes-config
      generate_api_key: true
      storage:
        size: 50Gi

  # 3. Collection for document embeddings
  - name: documents
    provider: qdrant
    type: collection
    config:
      url: ${{ vector-db.outputs.url }}
      api_key: ${{ vector-db.outputs.api_key }}
      name: documents
      vectors:
        size: 1536
        distance: Cosine
      on_disk: true

  # 4. Collection for FAQ embeddings (smaller model)
  - name: faq
    provider: qdrant
    type: collection
    config:
      url: ${{ vector-db.outputs.url }}
      api_key: ${{ vector-db.outputs.api_key }}
      name: faq
      vectors:
        size: 384
        distance: Cosine

Qdrant Cloud with Multiple Collections

Use Qdrant Cloud instead of self-hosting:

resources:
  - name: product-search
    provider: qdrant
    type: collection
    config:
      url: https://my-cluster.eu-central.aws.cloud.qdrant.io:6333
      api_key:
        $ref: qdrant-cloud-key
      name: products
      vectors:
        size: 768
        distance: Dot

  - name: image-search
    provider: qdrant
    type: collection
    config:
      url: https://my-cluster.eu-central.aws.cloud.qdrant.io:6333
      api_key:
        $ref: qdrant-cloud-key
      name: images
      vectors:
        size: 512
        distance: Cosine

Configuration

API Keys

Qdrant supports optional API key authentication. For the Database resource, you have three options:

  1. No authentication -- omit both api_key and generate_api_key (suitable for development)
  2. Generated key -- set generate_api_key: true to auto-generate a secure 32-character hex key
  3. Explicit key -- set api_key to a specific value (useful when rotating keys or matching existing config)

For Collection resources connecting to Qdrant Cloud, the api_key field is required and should reference a secret.

Vector Dimensions

Choose the vectors.size to match your embedding model:

Embedding Model Dimensions
OpenAI text-embedding-3-large 3072
OpenAI text-embedding-3-small 1536
OpenAI text-embedding-ada-002 1536
Cohere embed-english-v3.0 1024
Sentence Transformers (all-MiniLM-L6-v2) 384
Google text-embedding-004 768

Distance Metrics

Metric Best For
Cosine Text embeddings, normalized vectors (most common)
Euclid Spatial data, when absolute distance matters
Dot Pre-normalized embeddings, maximum inner product search

Development

# Lint and type check
task qdrant:check

# Format
task qdrant:format

Metadata

Release files for pragmatiks-qdrant-provider 8.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pragmatiks-qdrant-provider 8.0.1
File Size Uploaded
pragmatiks_qdrant_provider-8.0.1.tar.gz 10.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pragmatiks-qdrant-provider 8.0.1
File Interpreter ABI Platform
pragmatiks_qdrant_provider-8.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.4 kB

Release files / pragmatiks_qdrant_provider-8.0.1.tar.gz

Download URL pragmatiks_qdrant_provider-8.0.1.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
79ecd400817476c937e13322fc3a3931da34a909250e38ffa858ee6272242fb3
BLAKE2b-256 checksum
How to use checksums
44d2682267d00a0d99c1ed10032a5d66899daa4cbdcf813da43e61a6e2d2332b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pragmatiks_qdrant_provider-8.0.1-py3-none-any.whl

Download URL pragmatiks_qdrant_provider-8.0.1-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f512bd1b3e36726dd81403ebee23a2d163d04fcdc2261b5037021b64143bd5f
BLAKE2b-256 checksum
How to use checksums
f8f2b430c927382e54ca64bc04356cfc2386a5b8bc3a85fca83333c0a37666f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

8.2.0

2 release files

8.1.1

2 release files

8.1.0

2 release files

8.0.2

2 release files

This release

8.0.1 This release

2 release files

8.0.0

2 release files

7.0.8

2 release files

7.0.7

2 release files

7.0.6

2 release files

7.0.5

2 release files

7.0.4

2 release files

7.0.3

2 release files

7.0.2

2 release files

7.0.1

2 release files

7.0.0

2 release files

6.0.2

2 release files

6.0.1

2 release files

6.0.0

2 release files

5.0.0

2 release files

4.0.0

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.66.0

2 release files

0.65.0

2 release files

0.64.0

2 release files

0.63.0

2 release files

0.62.0

2 release files

0.61.0

2 release files

0.60.0

2 release files

0.59.0

2 release files

0.58.0

2 release files

0.57.0

2 release files

0.56.0

2 release files

0.55.0

2 release files

0.54.0

2 release files

0.53.0

2 release files

0.52.0

2 release files

0.51.0

2 release files

0.50.0

2 release files

0.49.0

2 release files

0.48.0

2 release files

0.47.0

2 release files

0.46.0

2 release files

0.45.0

2 release files

0.44.0

2 release files

0.43.0

2 release files

0.42.0

2 release files

0.36.0

2 release files

0.35.0

2 release files

0.34.0

2 release files

0.33.1

2 release files

0.33.0

2 release files

0.32.0

2 release files

0.31.0

2 release files

0.30.0

2 release files

0.29.0

2 release files

0.28.0

2 release files

0.27.0

2 release files

0.19.0

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.16.0

2 release files

0.15.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page