New to KubeDB? Please start here.

Neo4j Storage Autoscaling

KubeDB can automatically expand Neo4j persistent volumes as graph data grows. The Autoscaler watches volume usage and creates a volume-expansion operation before the disks become full.

Before You Begin

You should be familiar with:

How Storage Autoscaling Works

Storage autoscaling process for Neo4j
Fig: Neo4j storage autoscaling process
  1. The user creates a KubeDB Neo4j resource with durable storage.
  2. The Provisioner creates a persistent volume for every Neo4j pod.
  3. The user creates a Neo4jAutoscaler with a spec.storage.neo4j policy.
  4. The Autoscaler reads PVC usage from the KubeDB storage metrics API.
  5. When usage reaches usageThreshold, the Autoscaler calculates a larger size and creates a Neo4jOpsRequest of type VolumeExpansion.
  6. Ops Manager expands the PVCs using the configured online or offline mode.

Volume expansion requires a StorageClass with allowVolumeExpansion: true. Kubernetes does not support shrinking a PVC after it has been expanded.

The next guide demonstrates this workflow using actual Neo4j graph data.