Create a persistent volume

You create a persistent volume to be used for the data volume mount. For more information on persistent volumes and mounts, see Volume mounts and persistent volumes.

Create a GCP persistent disk using the following command. This is a normal GCP persistent disk and not Kubernetes specific:

gcloud compute disks create --size 128Gi --type pd-ssd "my-neo4j-disk"
Created [https://www.googleapis.com/compute/v1/projects/my-neo4j-project/zones/europe-west2-a/disks/my-neo4j-disk].
NAME           ZONE            SIZE_GB  TYPE    STATUS
my-neo4j-disk  europe-west2-a  128      pd-ssd  READY

New disks are unformatted. You must format and mount a disk before it
can be used. You can find instructions on how to do this at:

https://cloud.google.com/compute/docs/disks/add-persistent-disk#formatting

The message New disks are unformatted. You must format and mount a disk before it can be used. should not be a cause for concern, and there is no need to take action to format the disk. If necessary, the disk will be formatted automatically when used in Kubernetes.

Create an AWS EBS disk using the following command. This is a normal AWS EBS disk and not Kubernetes specific:

aws ec2 create-volume --availability-zone=${AWS_AVAILABILITY_ZONE} --size=64 --volume-type=gp3 --tag-specifications 'ResourceType=volume,Tags=[{Key=volume,Value=neo4j-k8s}]'

Fetch the ID of the disk that was just created.

aws ec2 describe-volumes --filters Name=tag:volume,Values=neo4j-k8s --query "Volumes[*].{ID:VolumeId}" --output text
vol-0795be227aff63b2a

Create an Azure-managed disk using the following command. This is a normal Azure managed disk and not Kubernetes specific:

az disk create --name "my-neo4j-disk" --size-gb "64" --sku Premium_LRS --max-shares 1

Fetch the ID of the disk that was just created.

az disk show --name "my-neo4j-disk" --query id
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myneo4jrg/providers/Microsoft.Compute/disks/my-neo4j-disk"

For Docker Desktop for macOS, this Quickstart guide leans on a dynamically provisioned volume.
The Neo4j helm command creates a Neo4j StatefulSet that relies on the default Kubernetes StorageClass to dynamically provision a persistent volume. As a consequence, the volume will not survive a Kubernetes restart.