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
5. extraArgs:
6. - --dbfilename=dump.rdb
7. - --save_schedule=*:* # HH:MM glob format
9. podSecurityContext:
10. fsGroup: 2000
12. securityContext:
13. capabilities:
14. drop:
15. - ALL
16. readOnlyRootFilesystem: true
17. runAsNonRoot: true
18. 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
4. prometheusRule:
5. enabled: true
6. spec:
7. - alert: DragonflyMissing
8. expr: absent(dragonfly_uptime_in_seconds) == 1
9. for: 0m
10. labels:
11. severity: critical
12. annotations:
13. summary: Dragonfly is missing
14. description: "Dragonfly is missing"
More Customization
For more customization please see the Dragonfly Chart
