Run arangodb as a statefulset in the cluster. Uses volume mount to persist the database.
This repository provides Kubernetes manifests for running ArangoDB as a StatefulSet within a Kubernetes cluster. The deployment uses persistent volume mounts to ensure database data is retained across pod restarts, rescheduling, and node failures—making it suitable for development, testing, and production environments.
ArangoDB is a native multi-model database supporting:
- Document
- Graph
- Key/value
This StatefulSet-based deployment enables:
- Stable network identities for each ArangoDB pod
- Persistent storage using Kubernetes volumes
- Predictable pod startup and shutdown ordering
- Compatibility with Kubernetes-native operations
- Workload Type: StatefulSet
- Storage: PersistentVolumeClaim (PVC) per pod
- Networking: Stable DNS names via headless service
- Data Persistence: Volume-mounted ArangoDB data directory
- Kubernetes 1.22+
- kubectl configured for your cluster
- A default StorageClass (or one explicitly defined)
- Persistent volumes supported by your environment
git clone https://github.com/pdvd-arangodb/arangodb-statefulset.git
cd arangodb-statefulset
- Create required resources
Apply configuration and secrets first:
kubectl apply -f configmap.yaml
kubectl apply -f secret.yaml
- Deploy the StatefulSet
kubectl apply -f service.yaml
kubectl apply -f statefulset.yaml
- Verify Deployment
kubectl get pods
kubectl get pvc
kubectl get svc
You should see pods similar to:
arangodb-0 Running
arangodb-1 Running
arangodb-2 Running
Port-forward (local access)
kubectl port-forward svc/arangodb 8529:8529
Then open: http://localhost:8529
| Service | Port |
|---|---|
| Web UI / API | 8529 |
| Cluster Internal | 8529 |
Persistent Storage
Each ArangoDB pod receives its own persistent volume:
- Data path:
/var/lib/arangodb3-
Storage behavior:
- Data persists if pods restart
- Data persists if pods move nodes
- Data remains until PVC is deleted
kubectl delete pvc -l app=arangodbTo scale the StatefulSet:
kubectl scale statefulset arangodb --replicas=3StatefulSets ensure:
- Ordered pod creation
- Ordered termination
- Stable identity per instance
Configuration options can be modified through:
- ConfigMap – ArangoDB settings
- Secrets – root password, JWT secrets
- StatefulSet – resources, volume size, replica count
Common settings include:
- Memory limits
- Storage size
- Authentication mode
- Cluster vs single-server mode
- Production Considerations
For production environments, consider:
- Enabling ArangoDB cluster mode
- Using separate Agency, DBServer, and Coordinator roles
- Setting resource requests and limits
- Configuring backups
- Enabling TLS
- Restricting network access via NetworkPolicies
- Monitoring with Prometheus exporters
Tested with:
- Kubernetes (EKS, GKE, AKS, k3s)
- CSI-backed persistent volumes
- ArangoDB 3.x
https://www.arangodb.com/docs/ https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ https://www.arangodb.com/docs/stable/deployment-kubernetes.html
- Website: https://ortelius.io
- GitHub: https://github.com/ortelius
- Discord: https://discord.gg/ortelius
Maintained by the Ortelius open-source community.