Skip to content

ortelius/pdvd-arangodb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ArangoDB StatefulSet for Kubernetes

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.


Overview

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

Architecture

  • Workload Type: StatefulSet
  • Storage: PersistentVolumeClaim (PVC) per pod
  • Networking: Stable DNS names via headless service
  • Data Persistence: Volume-mounted ArangoDB data directory

Prerequisites

  • Kubernetes 1.22+
  • kubectl configured for your cluster
  • A default StorageClass (or one explicitly defined)
  • Persistent volumes supported by your environment

Deployment

1. Clone the repository

git clone https://github.com/pdvd-arangodb/arangodb-statefulset.git
cd arangodb-statefulset
  1. Create required resources

Apply configuration and secrets first:

kubectl apply -f configmap.yaml
kubectl apply -f secret.yaml
  1. Deploy the StatefulSet
kubectl apply -f service.yaml
kubectl apply -f statefulset.yaml
  1. 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

Accessing ArangoDB

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

To Remove All Data

kubectl delete pvc -l app=arangodb

Scaling

To scale the StatefulSet:

kubectl scale statefulset arangodb --replicas=3

StatefulSets ensure:

  • Ordered pod creation
  • Ordered termination
  • Stable identity per instance

Configuration

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

Compatibility

Tested with:

  • Kubernetes (EKS, GKE, AKS, k3s)
  • CSI-backed persistent volumes
  • ArangoDB 3.x

References

https://www.arangodb.com/docs/ https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ https://www.arangodb.com/docs/stable/deployment-kubernetes.html

Community

Maintained by the Ortelius open-source community.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors