Prerequisites

Before you can deploy a Neo4j cluster on Kubernetes, you need to:

General prerequisites

Environment-specific prerequisites

Select the tab as per your Kubernetes environment and complete all prerequisites on it.

  1. Install the gcloud command-line interface (CLI) (https://cloud.google.com/sdk/docs/install).

  2. All the shell commands in this guide assume that the GCP Project, compute zone, and region to use, have been set using the CLOUDSDK_CORE_PROJECT, CLOUDSDK_COMPUTE_ZONE, and CLOUDSDK_COMPUTE_REGION environment variables, for example:

    export CLOUDSDK_CORE_PROJECT="neo4j-helm"
    export CLOUDSDK_COMPUTE_ZONE="europe-west6-c"
    export CLOUDSDK_COMPUTE_REGION="europe-west6"
    export CLOUDSDK_CONTAINER_CLUSTER="my-neo4j-gke-cluster"
  3. If you do not have a Google Kubernetes Engine (GKE) cluster, you can create a multi-node cluster (one node per Neo4j instance) using:

    gcloud container clusters create my-neo4j-gke-cluster --num-nodes=<num> --machine-type "e2-standard-2"

    e2-standard-2 is the minimum instance type required for running the examples of this startup guide on GKE.

  4. Configure kubectl to use your GKE cluster using:

    gcloud container clusters get-credentials my-neo4j-gke-cluster
    Fetching cluster endpoint and auth data.
    kubeconfig entry generated for my-neo4j-gke-cluster.
  1. Install the aws command-line interface (CLI) (https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html). Make sure you complete the AWS configuration step (https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html).

  2. Install the eksctl command-line interface (CLI) (https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html).

  3. All the shell commands in this guide assume that the AWS region to use has been set using the AWS_DEFAULT_REGION environment variable, for example:

    export AWS_DEFAULT_REGION="eu-west-1"
  4. If you do not have an AWS Elastic Kubernetes Service (EKS) cluster, you can create a multi-node cluster (one node per Neo4j instance) using the following command:

    This command requires that you have a public key named id_rsa.pub. If you do not have one, you can generate it by running:

    ssh-keygen -t rsa -C "your-name@example.com"
    eksctl create cluster --name "my-neo4j-eks-cluster" --region "${AWS_DEFAULT_REGION}" --nodegroup-name "neo4j-nodes" --nodes-min 1 --nodes-max 4 --node-type c4.xlarge --nodes 4 --node-volume-size 10 --ssh-access --with-oidc
  5. Create an IAM role (e.g., AmazonEKS_EBS_CSI_DriverRole) and attach the required AWS-managed policy to it (e.g., AmazonEBSCSIDriverPolicy).

    eksctl create iamserviceaccount \
      --name ebs-csi-controller-sa \
      --namespace kube-system \
      --cluster my-neo4j-eks-cluster \
      --attach-policy-arn arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy \
      --approve \
      --role-only \
      --role-name AmazonEKS_EBS_CSI_DriverRole
  6. Add the EBS CSI Driver as an Amazon EKS add-on to your cluster:

    eksctl create addon \
      --name aws-ebs-csi-driver \
      --cluster my-neo4j-eks-cluster \
      --service-account-role-arn arn:aws:iam::<aws-account-id>:role/AmazonEKS_EBS_CSI_DriverRole \
      --force

    Make sure to replace <aws-account-id> with your AWS account ID.

  7. Configure kubectl to use your EKS cluster using:

    aws eks update-kubeconfig --name my-neo4j-eks-cluster
  1. Install the az command-line interface (CLI) (https://docs.microsoft.com/en-us/cli/azure/install-azure-cli).

  2. Verify that you have a Resource Group with:

    • An Azure Kubernetes Service (AKS) cluster.

    • The AKS cluster principal needs to be assigned roles that allow it to manage Microsoft.Compute/disks in the Resource Group.

  3. Set the Resource group and the location to use as defaults using:

    az configure --defaults group=<MyResourceGroup>
    az configure --defaults location=<MyAzureLocation>

    If you do not have an AKS cluster, follow the steps to create a multi-node cluster (one node per Neo4j instance).

    1. Create a cluster by running:

      az aks create --name my-neo4j-aks-cluster --node-count=<num>
    2. Configure kubectl to use your AKS cluster using:

      az aks get-credentials --name my-neo4j-aks-cluster --admin