Install on Kubernetes with Helm Chart
This guide describes how to deploy Dragonfly on a Kubernetes cluster using Helm (See Install Helm).
Prerequisites
- A Kubernetes cluster (see Kind or Minikube if you want to experiment locally).
- Select the Dragonfly version:- For the latest version, set:
VERSION=v1.26.0
- Choose a version from here
 
- For the latest version, set:
Install a standalone master
Run this command:
helm upgrade --install dragonfly oci://ghcr.io/dragonflydb/dragonfly/helm/dragonfly --version $VERSION
Install a standalone master with snapshot taken every minute
- Add the following to the myvals.yamlvalues file (create a new file if it doesn't exist):
storage:
  enabled: true
  requests: 128Mi # Set as desired
extraArgs:
  - --dbfilename=my-dump-{timestamp} # should only contain the filename without any file extensions
  - --snapshot_cron=* * * * * # cron format
podSecurityContext:
  fsGroup: 2000
securityContext:
  capabilities:
    drop:
      - ALL
  readOnlyRootFilesystem: true
  runAsNonRoot: true
  runAsUser: 1000
- Run this command:
helm upgrade -f myvals.yaml --install dragonfly oci://ghcr.io/dragonflydb/dragonfly/helm/dragonfly --version $VERSION
Integrate with Kube-Prometheus Monitoring
If you have Kube-Prometheus installed in your cluster, you set it to monitor your Dragonfly deployment by enabling the serviceMonitor and prometheusRule in your values file. For example:
serviceMonitor:
  enabled: true
prometheusRule:
  enabled: true
  spec:
    - alert: DragonflyMissing
      expr: absent(dragonfly_uptime_in_seconds) == 1
      for: 0m
      labels:
        severity: critical
      annotations:
        summary: Dragonfly is missing
        description: "Dragonfly is missing"
More Customization
For more customization please see the Dragonfly Chart