安装 Neo4j 集群服务器
要在 Kubernetes 中使一切正常运行,某些 K8s 对象必须具有在其他地方引用的特定名称。每个 Neo4j 实例都是一个 Helm “发布”,并具有一个 release name。发布名称必须由小写字母数字字符、-
或 .
组成,并且必须以字母数字字符开头和结尾。
以下示例安装使用 |
-
使用在创建 Helm 部署值文件中创建的部署 server-<num>.values.yaml 文件和 neo4j/neo4j Helm chart 独立安装每个服务器。
-
创建
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 chart 已自动为您生成了一个。所有集群成员的密码都是相同的。您可以在 Helm 安装输出中找到它。请记下它。
-
-
验证已安装的服务器是否已形成集群。请参阅下一节验证 Neo4j 集群的形成。