Verify the Neo4j cluster formation

You check the pods and services to verify that the servers have managed to form a cluster.

  1. Check that the pods are READY.

    Typically, it takes a minute or two after the pods are running. They become READY after they form a cluster. You can watch pod status changes by adding the -w option to the kubectl command (kubectl get pods -w).

    kubectl get pods
    server-1-0   1/1     Running   0          147m
    server-2-0   1/1     Running   0          147m
    server-3-0   1/1     Running   0          147m
  2. You can also check the logs of the pods, for example:

    kubectl exec server-2-0 -- tail /logs/neo4j.log
    2022-10-26 11:37:42.516+0000 INFO  Remote interface available at http://localhost:7474/
    2022-10-26 11:37:42.539+0000 INFO  id: 72419021DEA149919ABFFD4930EDE02131E52E77F7EADF62C6323BC4F2D01EC5
    2022-10-26 11:37:42.539+0000 INFO  name: system
    2022-10-26 11:37:42.539+0000 INFO  creationDate: 2022-10-26T11:37:28.784Z
    2022-10-26 11:37:42.540+0000 INFO  Started.
    2022-10-26 11:37:47.177+0000 INFO  This instance bootstrapped the 'neo4j' database.
    2022-10-26 11:37:58.644+0000 INFO  Connected to server-3-internals.neo4j.svc.cluster.local/ [RAFT version:1.0]
    2022-10-26 12:01:32.066+0000 INFO  Direct driver instance 577812770 created for server address server-1-internals.neo4j.svc.cluster.local:7688
    2022-10-26 12:02:40.172+0000 INFO  Closing driver instance 577812770
    2022-10-26 12:02:40.174+0000 INFO  Closing connection pool towards server-1-internals.neo4j.svc.cluster.local:7688
  3. Check that the services look good:

    kubectl get services
    NAME            TYPE          CLUSTER-IP      EXTERNAL-IP    PORT(S)                                        AGE
    my-cluster-lb-neo4j   LoadBalancer   7474:32169/TCP,7473:32145/TCP,7687:32624/TCP                              148m
    server-1              ClusterIP   <none>           7687/TCP,7474/TCP,7473/TCP                                                148m
    server-1-admin        ClusterIP   <none>           6362/TCP,7687/TCP,7474/TCP,7473/TCP                                       148m
    server-1-internals    ClusterIP      None           <none>           6362/TCP,7687/TCP,7474/TCP,7473/TCP,7688/TCP,5000/TCP,7000/TCP,6000/TCP   148m
    server-2              ClusterIP   <none>           7687/TCP,7474/TCP,7473/TCP                                                148m
    server-2-admin        ClusterIP    <none>           6362/TCP,7687/TCP,7474/TCP,7473/TCP                                       148m
    server-2-internals    ClusterIP      None           <none>           6362/TCP,7687/TCP,7474/TCP,7473/TCP,7688/TCP,5000/TCP,7000/TCP,6000/TCP   148m
    server-3              ClusterIP    <none>           7687/TCP,7474/TCP,7473/TCP                                                148m
    server-3-admin        ClusterIP    <none>           6362/TCP,7687/TCP,7474/TCP,7473/TCP                                       148m
    server-3-internals    ClusterIP      None           <none>           6362/TCP,7687/TCP,7474/TCP,7473/TCP,7688/TCP,5000/TCP,7000/TCP,6000/TCP   148m

    For more information about the Neo4j services, see Access a Neo4j cluster.