Assign Neo4j pods to specific nodes

The Neo4j Helm charts neo4j/neo4j and neo4j/neo4j-admin (from Neo4j 5.10) provide support for assigning your Neo4j pods to specific nodes using nodeSelector labels.

You specify the nodeSelector labels in the values.yaml file.

If there is no node with the given labels, the Helm chart will throw an error.

nodeSelector labels in values.yaml
#nodeSelector labels
#Ensure the respective labels are present on one of the cluster nodes or else Helm chart will throw an error.
   nodeNumber: one
   name: node1
nodeSelector along with the --dry-run flag

When running helm install --dry-run or helm template --dry-run with nodeSelector, you must disable the lookup function of nodeSelector by setting disableLookups: true. Otherwise, the commands will fail.

You can either add the following to the values.yaml file:

disableLookups: true

or, use --set disableLookups=true as part of the command, for example:

helm template standalone neo4j --set disableLookups=true .. ... .. --dry-run