安装 Neo4j 集群服务器
使所有内容在 Kubernetes 中正常工作需要某些 K8s 对象具有特定名称,这些名称在其他地方引用。每个 Neo4j 实例都是一个 Helm“发布”,并具有发布名称。发布名称必须包含小写字母数字字符、-
或 .
,并且必须以字母数字字符开头和结尾。
以下示例安装使用 |
-
使用在创建 Helm 部署值文件 中创建的部署server-<num>.values.yaml 文件和neo4j/neo4j Helm 图表,分别安装每个服务器。
-
创建一个
neo4j
命名空间并将其配置为在当前上下文中使用kubectl create namespace neo4j kubectl config set-context --current --namespace=neo4j
-
安装
server-1
helm install server-1 neo4j/neo4j --namespace neo4j -f server-1.values.yaml
示例输出NAME: server-1 LAST DEPLOYED: Wed Oct 26 11:50:41 2022 NAMESPACE: neo4j STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: Thank you for installing neo4j. Your release "server-1" has been installed in namespace "neo4j". The neo4j user's password has been set to "my-password". This release creates a single member of a Neo4j cluster. It will not become ready until it is able to form a working Neo4j cluster by joining other Neo4j servers. To create a working cluster at least 3 servers are required. Once you have a working Neo4j cluster, you can access the Neo4j browser using the IP address of the my-cluster-lb-neo4j service eg. http://[SERVICE_IP]:7474 Graphs are everywhere!
-
安装
server-2
helm install server-2 neo4j/neo4j --namespace neo4j -f server-2.values.yaml
示例输出NAME: server-2 LAST DEPLOYED: Wed Oct 26 11:51:27 2022 NAMESPACE: neo4j STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: Thank you for installing neo4j. Your release "server-2" has been installed in namespace "neo4j". The neo4j user's password has been set to "my-password". This release creates a single member of a Neo4j cluster. It will not become ready until it is able to form a working Neo4j cluster by joining other Neo4j servers. To create a working cluster at least 3 servers are required. Once you have a working Neo4j cluster, you can access the Neo4j browser using the IP address of the my-cluster-lb-neo4j service eg. http://[SERVICE_IP]:7474 Graphs are everywhere!
-
安装
server-3
helm install server-3 neo4j/neo4j --namespace neo4j -f server-3.values.yaml
示例输出NAME: server-3 LAST DEPLOYED: Wed Oct 26 11:52:02 2022 NAMESPACE: neo4j STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: Thank you for installing neo4j. Your release "server-3" has been installed in namespace "neo4j". The neo4j user's password has been set to "my-password". This release creates a single member of a Neo4j cluster. It will not become ready until it is able to form a working Neo4j cluster by joining other Neo4j servers. To create a working cluster at least 3 servers are required. Once you have a working Neo4j cluster, you can access the Neo4j browser using the IP address of the my-cluster-lb-neo4j service eg. http://[SERVICE_IP]:7474 Graphs are everywhere!
如果您没有为
neo4j
用户传递密码,Neo4j Helm 图表会为您自动生成一个密码。该密码对于所有集群成员都相同。您可以在 Helm 安装输出中找到它。记下它。
-
-
验证已安装的服务器是否已形成集群。请参阅下一节验证 Neo4j 集群的形成。