These instructions explain how to deploy Dragonfly, an open-source vector database built for GenAI applications, on CoreWeave Kubernetes Service (CKS).Documentation Index
Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you start, you need:- A working CKS cluster, ideally with CPU Nodes. You can also use a GPU Node cluster, but Dragonfly has no capability that would benefit from GPUs.
Step 1. Verify your system configuration
-
Verify that you can access your cluster with
kubectl. For example:You should see something similar to: -
Verify your cluster has at least one CPU Node. GPU Nodes are also supported, but CPU Nodes are preferred since Dragonfly cannot leverage GPUs for any of its functionality. For example:
You should see something similar to the following:
Step 2. Deploy Dragonfly
-
Install the Dragonfly Operator. See the Operator installation guide for more details.
This installs the Dragonfly Custom Resource Definition (CRD), which is used to define Dragonfly clusters, along with the Operator that manages them. It creates a new namespace called
dragonfly-operator-systemfor the Operator itself. It’s possible to adddragonfly-operatoras a dependency to the CoreWeave chart (which you’ll download in the next step), but it’s preferred to install it in a separate namespace from the database. The Operator can manage multiple Dragonfly clusters in different namespaces. - Clone the CoreWeave Dragonfly chart repository. It’s located at https://github.com/coreweave/reference-architecture/tree/main/tooling/vector_dbs/cw-dragonfly.
-
Edit the chart’s
values.yamlwith your details. None of the values invalues.ymlmust be changed, but you may want to adjust them for your specific use case. Keep the following principles in mind:- Dragonfly allocates 80% of the limit memory.
- If the CPU limit is set, the I/O threads are equal to it.
- If the CPU limit is not set, all visible cores are used.
- If the CPU limit is not set and the proactor threads parameter is set, the parameter is used.
- Ensure you have 256MiB memory per thread.
- See CoreWeave CPU Instances for details about the number of cores and memory per Node.
- Provisioning a secret for the database password. You can also specify one of your own via the
dbPasswordattribute invalues.yaml, or provide an existing secret containing the password viaexistingDbPasswordSecretName. - Sets Node affinities for the Dragonfly Pods to CPU Nodes. Pods will be scheduled onto GPU Nodes if no CPU Nodes are available.
- Configures snapshotting to PVC backed by VAST.
values.yaml.Out of the box, the chart configures Dragonfly to maintain a single snapshot file and provisions a sidecar container that copies the snapshot to a persistent volume. You can control the scheduling of the snapshot copy job viasnapshotMoveCron.
Step 3. Install the chart
-
Change to the chart directory:
-
Install the chart in a new namespace, e.g.
dragonfly: -
Check the status of the custom resource. This may take several minutes to complete, as the Operator sets up the database.
The
Statusblock will show the status of the database. Once everything is set up, that block should look like this:
Step 4. Access the database
After the database is ready, the database service is available on port 6379. To access it, forward local ports from your machine to the service.-
Forward a local port to the database service.
-
Connect to the database at
localhost:27017. You can use any Redis client, such as the Redis CLI, to connect:If you did not specify your own password, you can get the password by looking at thecw-dragonfly-db-passwordsecret in thedragonflynamespace. Note the password will be base64 encoded.