falkordb
by upstreamyard
FalkorDB Helm chart for Kubernetes. Graph database (openCypher, GraphRAG, knowledge graphs for AI agents) on the official falkordb-server image, as a single instance or highly available with replication and Redis Sentinel failover, password auth by default, AOF persistence, non-root, Prometheus metrics and helm test. Community chart by upstreamyard, not an official FalkorDB chart. FalkorDB is licensed under SSPL-1.0.
About this chart
FalkorDB Helm chart: FalkorDB graph database on Kubernetes
Have any questions, feedback or need help (e.g. setup, hardened images, etc.)? Reach out to [email protected]
Helm chart for FalkorDB, the low-latency graph database for knowledge graphs, GraphRAG and AI agent memory, queried with openCypher. It runs a single instance or a highly available primary with replicas and Redis Sentinel, which promotes a replica automatically when the primary fails. A password is required by default, graphs are kept with AOF and RDB persistence, and Prometheus metrics, a ServiceMonitor and helm test are included. It uses FalkorDB's official falkordb/falkordb-server image (FalkorDB 6.0), runs it as non-root on a read-only root filesystem, and replaces the Bitnami Redis chart workaround for running FalkorDB on Kubernetes.
Community chart by upstreamyard, not an official FalkorDB chart. FalkorDB is licensed under the Server Side Public License (SSPL-1.0); this chart is Apache-2.0. FalkorDB is a trademark of FalkorDB Ltd.
AI agents and coding assistants: this README is the complete reference for the chart. FalkorDB itself (Cypher, clients, configuration parameters) is documented at docs.falkordb.com.
Install
helm repo add upstreamyard https://upstreamyard.github.io/helm-charts
helm install falkordb upstreamyard/falkordb
Or from the OCI registry:
helm install falkordb oci://ghcr.io/upstreamyard/charts/falkordb
The install notes show the address and the command that prints the generated password. Then check that graphs can be written and read:
helm test falkordb
Verifying the chart
Chart packages are PGP-signed. Import the public key (fingerprint 9B416F989B7E6C65F7F3BFAE7689688B20EC7813) and install with --verify:
curl -s https://upstreamyard.github.io/helm-charts/pgp_keys.asc | gpg --dearmor > upstreamyard.gpg
helm install falkordb upstreamyard/falkordb --verify --keyring upstreamyard.gpg
The OCI copy on GHCR is signed with cosign instead (see the repository README).
What the chart does
- StatefulSet with stable pod names (
<release>-falkordb-0,-1, …) and a volume per pod for/var/lib/falkordb/data. - Security:
- a generated password (
requirepass) in a Secret, kept across upgrades, also required by Sentinel; - non-root (UID 999, the image's
falkordbuser), read-only root filesystem, all capabilities dropped, no ServiceAccount token. Works in namespaces with Pod Securityrestricted.
- a generated password (
- Durability: AOF (
appendfsync everysec) and RDB snapshots by default; FalkorDB saves on shutdown within the 60-second grace period. - Replication with Sentinel (
architecture: replication):- one primary and replicas, plus a Sentinel container in every pod; pods and Sentinels address each other by stable DNS names, so changing pod IPs don't matter;
- planned restarts (rolling upgrades,
kubectl delete pod, node drains) hand over the primary role first: writes are paused, the replicas catch up, a replica is promoted, and the old primary follows it; - the primary only accepts writes while at least one replica is connected (
replication.minReplicasToWrite), so a primary that was cut off or frozen can't accept writes that would be lost; - a pod that comes back with an empty volume never becomes primary while another pod still has the data; it waits until Sentinel promotes a pod with data, then copies it;
- each Sentinel keeps its state (the last primary and epochs) on the pod's volume and knows every other pod, so after a full outage the pods agree on the last primary, and Sentinel can promote a replica even when that primary doesn't come back;
- PodDisruptionBudget and soft anti-affinity across nodes.
- Probes: a pod is ready only when FalkorDB has loaded its data and, on replicas, is in sync with the primary. The startup probe allows 30 minutes for loading large graphs.
- Metrics:
metrics.enabledaddsredis_exporteron port 9121;metrics.serviceMonitor.enabledadds a ServiceMonitor.
Why this chart
FalkorDB's own Helm repository has charts for the browser UI and the SQL import tool, but not for the database. The other ways to run it on Kubernetes:
| This chart | Bitnami Redis chart with the FalkorDB image | KubeBlocks FalkorDB addon | |
|---|---|---|---|
| FalkorDB version | 6.0 (official falkordb-server image, updated with each release) | latest tag in FalkorDB's instructions | 4.12.5 (chart 1.2.0-alpha.0) |
| Extra requirements | none | allowInsecureImages: true; Bitnami's redis-cluster option uses the frozen bitnamilegacy image | the KubeBlocks operator |
| HA with automatic failover | Sentinel, writes paused and handed over on planned restarts | Sentinel | replication with switchover |
| Backups | not included (RDB/AOF on the volumes) | not included | BGSAVE and AOF backups |
| Sharding (Redis Cluster) | not yet | redis-cluster chart | yes |
Deployment modes
Single instance (default)
One FalkorDB pod with its graphs on a PersistentVolumeClaim. If the pod or node fails, Kubernetes restarts it on the same volume; in our test, a 2,000-node graph was back after the pod was deleted.
persistence:
size: 20Gi
resources:
requests:
cpu: "1"
memory: 4Gi
limits:
memory: 4Gi
High availability with Sentinel
architecture: replication
replicaCount: 3 # one primary, two replicas, three Sentinels
persistence:
size: 20Gi
At least 3 pods: with 2, the remaining Sentinel has no majority and can't promote the replica. The first install makes pod 0 the primary.
Tested in kind (3 nodes, 3 pods, a client writing once per second through Sentinel, comparing every acknowledged write with the database afterwards):
| Event | Writes failed | Acknowledged writes lost |
|---|---|---|
Rolling helm upgrade from FalkorDB 6.0.1 to 6.0.2 (66 s) | 1 | 0 |
kubectl delete pod on the primary (pod gone in 4 s) | 1 | 0 |
Primary's node frozen (docker pause) for 60 s | for 9 s, until a replica was promoted | 0 |
| Primary restarted with an empty volume | for 8 s; the pod waited, then copied the data from the promoted replica | 0 |
| Replica's volume and pod deleted | none; the replica copied the data from the primary | 0 |
| All pods stopped and started again | (no client) | 0 |
| All pods stopped, the primary's volume deleted, started again | (no client); ready again after 20 s with a promoted replica | 0 |
Without the write pause in the handover, the same pod deletion lost 11 acknowledged writes in our test, and without minReplicasToWrite a frozen primary lost 11 writes it accepted after it came back. Replication is asynchronous, so a primary that crashes can still lose the writes of its last moment that hadn't reached a replica.
Connecting clients
The install notes print the exact addresses.
- Single instance:
<release>-falkordb.<namespace>.svc:6379. - Replication: connect to Sentinel at
<release>-falkordb.<namespace>.svc:26379with the primary namefalkordb(sentinel.masterSet) and the same password. Clients then always write to the current primary and switch after a failover. - Read-only queries (
GRAPH.RO_QUERY) may also use port 6379 of the same Service, which spreads them over all ready pods. Writes there fail on replicas withREADONLY.
Python (falkordb): the client detects Sentinel by itself:
from falkordb import FalkorDB
db = FalkorDB(host="falkordb-falkordb.default.svc", port=26379, password=password)
graph = db.select_graph("social")
It doesn't pass socket timeouts to its Sentinel connections, though (falkordb 1.2.0). When the primary's node froze in our test, such a client hung for minutes. For production, build the Sentinel connection with redis-py and hand it to FalkorDB, which recovered in about 9 s in the same test:
from redis.sentinel import Sentinel
from falkordb import FalkorDB
timeouts = {"socket_timeout": 2, "socket_connect_timeout": 2}
sentinel = Sentinel([("falkordb-falkordb.default.svc", 26379)],
sentinel_kwargs={"password": password, **timeouts},
password=password, **timeouts)
db = FalkorDB(connection_pool=sentinel.master_for("falkordb").connection_pool)
Retry a write that fails with a connection error, timeout or READONLY: that is the failover. Clients in other languages can use their Redis client's Sentinel support in the same way (not tested here).
From your machine: kubectl port-forward svc/<release>-falkordb 6379, then e.g. redis-cli -a <password> GRAPH.QUERY social "MATCH (n) RETURN count(n)". With replication, this reaches any pod, so use it for reads.
Configuration
-
FalkorDB settings (
THREAD_COUNT,TIMEOUT_MAX,QUERY_MEM_CAPACITY, …): theconfigmap, passed to the module. The defaults are those of the official image, including a 1-second timeout for read queries (TIMEOUT 1000). Set a key tonullto remove it:config: TIMEOUT: null # no 1-second read timeout TIMEOUT_DEFAULT: 30000 # 30 s for reads and writes THREAD_COUNT: 4 -
Redis settings (
maxclients,aclfile, …):extraConfig, added after the chart's own lines. -
Durability:
durability.appendonly,durability.appendfsyncanddurability.save. -
CSV import (
LOAD CSV): mount the files and pointIMPORT_FOLDERat them;file://people.csvthen reads/import/people.csv:config: IMPORT_FOLDER: /import/ extraVolumes: - name: csv configMap: name: people-csv extraVolumeMounts: - name: csv mountPath: /import
Production example
# values-prod.yaml
architecture: replication
replicaCount: 3
auth:
existingSecret: falkordb-auth # key: password
config:
MAX_QUEUED_QUERIES: 25
TIMEOUT: null
TIMEOUT_MAX: 60000
TIMEOUT_DEFAULT: 10000
RESULTSET_SIZE: 10000
THREAD_COUNT: 4
persistence:
size: 50Gi
resources:
requests:
cpu: "4"
memory: 16Gi
limits:
memory: 16Gi
metrics:
enabled: true
serviceMonitor:
enabled: true
podAntiAffinityPreset: hard
Size the memory limit for the graphs plus headroom: snapshots and AOF rewrites fork the process, and pages changed meanwhile are copied.
Known issues
- All volumes lost: the chart protects against losing one pod's volume. If every pod's volume is lost, the graphs are gone; keep backups of the RDB/AOF files or volume snapshots.
- Generated password after uninstall:
helm uninstalldeletes the chart's Secret; a new install generates a new password (the graphs on the kept volumes are unaffected). Useauth.existingSecretin production. - Argo CD and other
helm templatetools can't read the existing Secret and generate a new password on every render. Setauth.existingSecretorauth.password. IMPORT_FOLDERdefault: FalkorDB 6.0.2 reports/var/lib/FalkorDB/import/, which doesn't exist in the image. Set it as shown above.- Not included yet: Redis Cluster (sharding), TLS and the experimental Bolt protocol.
FAQ
Is there an official FalkorDB Helm chart? No. FalkorDB's Helm repository has charts for the browser and the SQL import tool, and its documentation installs the Bitnami Redis chart with the FalkorDB image. This chart is maintained by upstreamyard.
What replaces the Bitnami Redis chart for FalkorDB? This chart. It runs the official FalkorDB image without allowInsecureImages, loads the module itself, and supports Sentinel HA.
How do I run FalkorDB highly available on Kubernetes? architecture: replication with replicaCount: 3, and connect through Sentinel. See Deployment modes.
How do I monitor FalkorDB with Prometheus? metrics.enabled=true and metrics.serviceMonitor.enabled=true.
Why do my queries fail with Query timed out? The official image sets TIMEOUT 1000, so read queries stop after 1 second. Raise or remove it in config (see Configuration).
Why do writes fail with NOREPLICAS Not enough good replicas to write? The primary has no replica in sync, e.g. while both replicas restart. It refuses writes to avoid losing them; set replication.minReplicasToWrite: 0 to accept them anyway.
Why do writes fail with READONLY You can't write against a read only replica? The client wrote to a replica: through port 6379 of the Service with architecture: replication, or right after a failover. Connect through Sentinel and retry.
How many queries run in parallel? THREAD_COUNT, which defaults to the CPU limit, or to all of the node's cores without one (16 threads on a 16-core node in our test). Set it in config when pods share large nodes.
Why does a pod log this pod's volume is empty. Waiting for a pod with data to be promoted? The pod lost its data while it was the primary (or while all pods were down). Starting it as primary would make the replicas copy its empty dataset, so it waits until Sentinel promotes a pod that has the data (after sentinel.downAfterMilliseconds), then copies the data from it.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | Affinity. Replaces podAntiAffinityPreset. |
| architecture | string | "standalone" | standalone: one FalkorDB instance. replication: one primary and replicas with Redis Sentinel, which promotes a replica when the primary fails. |
| aut |
Deploy falkordb with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has falkordb on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartfalkordb is pinned at v0.1.8 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply