Prerequisites

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

1. General prerequisites

  • Configure the Neo4j Helm Chart repository.

  • Obtain a valid license if you want to install Neo4j Enterprise Edition. The Neo4j Community Edition (default for the standalone chart) does not require a license. For more information, see https://neo4j.com/licensing/ or write to licensing@neo4j.com.

  • Install the Kubernetes client command-line tool kubectl (https://kubernetes.io/docs/tasks/tools/).

  • Set up a Kubernetes cluster with sufficient CPU and memory for your Neo4j deployment.

    This guide works with minimum CPU and memory allocated per Neo4j instance. However, the Neo4j system requirements largely depend on the use of the software. Therefore, for running Neo4j in development or production environments, please refer to System requirements.

    If you do not have a Kubernetes cluster, you can configure a single-node one as per your environment, see the next section Environment-specific prerequisites.

2. 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="my-neo4j-project"
    export CLOUDSDK_COMPUTE_ZONE="europe-west2-a"
    export CLOUDSDK_COMPUTE_REGION="europe-west2"
  3. If you do not have a Google Kubernetes Engine (GKE) cluster, you can create a single-node one using:

    gcloud container clusters create my-neo4j-gke-cluster --num-nodes=1 --machine-type "e2-standard-2" --release-channel "stable"

    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 and availability zone to use have been set using the AWS_DEFAULT_REGION and AWS_AVAILABILITY_ZONE environment variables, for example:

    export AWS_DEFAULT_REGION="eu-west-1"
    export AWS_AVAILABILITY_ZONE="eu-west-1c"
  4. If you do not have an AWS Elastic Kubernetes Service (EKS) cluster, you can create a single-node one 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" --node-zones "${AWS_AVAILABILITY_ZONE}" --nodes-min 1 --nodes-max 2 --node-type c4.xlarge --nodes 1 --node-volume-size 10 --ssh-access --with-oidc
  5. 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 single-node one.

    1. Create a cluster by running:

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

      az aks get-credentials --name my-neo4j-aks-cluster --admin
  • Install Docker Desktop for macOS. For more information, see Docker official documentation.

  • Enable the Docker Desktop Kubernetes engine. For more information, see Docker official documentation.

  • Verify that you do not have a running instance of Neo4j (e.g., via Neo4j Desktop or Neo4j Browser) to avoid port clashes.