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. You’ll need the following tools on your local machine:Step 1. Verify your system configuration
Before deploying Dragonfly, confirm that your local tooling can reach the cluster and that the cluster has Nodes suitable for running the database.-
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 use GPUs for any of its functionality. For example:
You should see something similar to the following:
Step 2. Deploy Dragonfly
In this step, you install the Dragonfly Operator and prepare the CoreWeave Dragonfly Helm chart that defines your database cluster.-
Install the Dragonfly Operator. See the Operator installation guide for more details.
This installs the Dragonfly Custom Resource Definition (CRD), which defines Dragonfly clusters, along with the Operator that manages them. It creates a new namespace called
dragonfly-operator-systemfor the Operator itself. You can adddragonfly-operatoras a dependency to the CoreWeave chart, which you download in the next step. However, installing it in a separate namespace from the database is preferred. 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.yamlmust be changed, but you can 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 through the
dbPasswordattribute invalues.yaml, or provide an existing secret containing the password throughexistingDbPasswordSecretName. - Setting Node affinities for the Dragonfly Pods to CPU Nodes. Pods will be scheduled onto GPU Nodes if no CPU Nodes are available.
- Configuring snapshotting to PVC backed by VAST.
values.yaml.By default, 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 throughsnapshotMoveCron.
Step 3. Install the chart
With the Operator running and the chart values reviewed, install the chart to create the Dragonfly cluster in your CKS environment.-
Change to the chart directory:
-
Install the chart in a new namespace, for example,
dragonfly: -
Check the status of the custom resource. This may take several minutes to complete, as the Operator sets up the database.
The
Statusblock shows 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, its service is available on port6379. To access it, forward local ports from your machine to the service.
-
Forward a local port to the database service.
You should see output similar to:
-
Connect to the database at
localhost:27017. You can use any Redis client, such as the Redis CLI, to connect:If you didn’t specify your own password, you can get the password by looking at thecw-dragonfly-db-passwordsecret in thedragonflynamespace. Note the password is base64 encoded.