Install on Kubernetes with Helm Chart

Prerequisites

  • This manual uses Helm to deploy Dragonfly on a Kuberenetes cluster. See Install Helm
  • A Kuberenetes cluster (See Kind or Minikube if you want to experiment locally)
  • For latest version set VERSION=v1.2.1
  • Or pick a version from here

Install a standalone master

helm upgrade --install dragonfly oci://ghcr.io/dragonflydb/dragonfly/helm/dragonfly --version $VERSION

Install a standalone master with snapshot taken every minute

Create or add to your myvals.yaml values file

  1. storage:
  2. enabled: true
  3. requests: 128Mi # Set as desired
  4. extraArgs:
  5. - --dbfilename=dump.rdb
  6. - --save_schedule=*:* # HH:MM glob format
  7. podSecurityContext:
  8. fsGroup: 2000
  9. securityContext:
  10. capabilities:
  11. drop:
  12. - ALL
  13. readOnlyRootFilesystem: true
  14. runAsNonRoot: true
  15. runAsUser: 1000

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 can have it monitor your dragonfly deployment by enbaling the serviceMonitor and prometheusRule in your values file. See an example below.

  1. serviceMonitor:
  2. enabled: true
  3. prometheusRule:
  4. enabled: true
  5. spec:
  6. - alert: DragonflyMissing
  7. expr: absent(dragonfly_uptime_in_seconds) == 1
  8. for: 0m
  9. labels:
  10. severity: critical
  11. annotations:
  12. summary: Dragonfly is missing
  13. description: "Dragonfly is missing"

More Customization

For more customization please see the Dragonfly Chart