Skip to content

Commit

Permalink
docs: fix check status command error
Browse files Browse the repository at this point in the history
Signed-off-by: Rory Z <[email protected]>
  • Loading branch information
Rory-Z committed Apr 17, 2024
1 parent 835419b commit 9d40678
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 40 deletions.
44 changes: 24 additions & 20 deletions docs/en_US/tasks/configure-emqx-core-replicant.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,56 +71,60 @@ There must be at least one Core node in the EMQX cluster. For the purpose of hig

Access `http://192.168.1.200:18083` through a browser, and use the default username and password `admin/public` to login EMQX console.

## Verify EMQX Cluster <!--not sure what this verify is-->
## Verify EMQX Cluster

```bash
$ kubectl get emqx emqx -o json | jq .status.emqxNodes
```

Information about all the nodes in the cluster can be obtained by checking the `.status.emqxNodes` of the EMQX custom resources. The `role` field of the `node` indicates its role in the cluster, in the above case a cluster consisting of two Core nodes and three Replicant nodes is deployed.
Information about all the nodes in the cluster can be obtained by checking the `.status` of the EMQX custom resources.

```bash
$ kubectl get emqx emqx -o json | jq .status.coreNodes
[
{
"node": "emqx@10.244.4.56",
"node": "emqx@emqx-core-0.emqx-headless.default.svc.cluster.local",
"node_status": "running",
"otp_release": "24.3.4.2-2/12.3.2.2",
"role": "replicant",
"role": "core",
"version": "5.0.20"
},
{
"node": "emqx@10.244.4.57",
"node": "emqx@emqx-core-1.emqx-headless.default.svc.cluster.local",
"node_status": "running",
"otp_release": "24.3.4.2-2/12.3.2.2",
"role": "replicant",
"role": "core",
"version": "5.0.20"
},
{
"node": "emqx@10.244.4.58",
{
"node": "emqx@emqx-core-2.emqx-headless.default.svc.cluster.local",
"node_status": "running",
"otp_release": "24.3.4.2-2/12.3.2.2",
"role": "replicant",
"role": "core",
"version": "5.0.20"
},
}
]
```


```bash
$ kubectl get emqx emqx -o json | jq .status.replicantNodes
[
{
"node": "emqx@emqx-core-0.emqx-headless.default.svc.cluster.local",
"node": "emqx@10.244.4.56",
"node_status": "running",
"otp_release": "24.3.4.2-2/12.3.2.2",
"role": "core",
"role": "replicant",
"version": "5.0.20"
},
{
"node": "emqx@emqx-core-1.emqx-headless.default.svc.cluster.local",
"node": "emqx@10.244.4.57",
"node_status": "running",
"otp_release": "24.3.4.2-2/12.3.2.2",
"role": "core",
"role": "replicant",
"version": "5.0.20"
},
{
"node": "emqx@emqx-core-2.emqx-headless.default.svc.cluster.local",
"node": "emqx@10.244.4.58",
"node_status": "running",
"otp_release": "24.3.4.2-2/12.3.2.2",
"role": "core",
"role": "replicant",
"version": "5.0.20"
}
]
Expand Down
44 changes: 24 additions & 20 deletions docs/zh_CN/tasks/configure-emqx-core-replicant.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,54 +73,58 @@ EMQX 集群中至少要有一个 Core 节点,出于高可用的目的,EMQX O

## 检查 EMQX 集群

```bash
$ kubectl get emqx emqx -o json | jq .status.emqxNodes
```

可以通过检查 EMQX 自定义资源的状态来获取所有集群中节点的信息,节点的 `role` 字段表示它们在集群中的角色,在上文中部署了一个由两个 Core 节点与三个 Replicant 节点组成的集群。
可以通过检查 EMQX 自定义资源的状态来获取所有集群中节点的信息。

```bash
$ kubectl get emqx emqx -o json | jq .status.coreNodes
[
{
"node": "emqx@10.244.4.56",
"node": "emqx@emqx-core-0.emqx-headless.default.svc.cluster.local",
"node_status": "running",
"otp_release": "24.3.4.2-2/12.3.2.2",
"role": "replicant",
"role": "core",
"version": "5.0.20"
},
{
"node": "emqx@10.244.4.57",
"node": "emqx@emqx-core-1.emqx-headless.default.svc.cluster.local",
"node_status": "running",
"otp_release": "24.3.4.2-2/12.3.2.2",
"role": "replicant",
"role": "core",
"version": "5.0.20"
},
{
"node": "emqx@10.244.4.58",
{
"node": "emqx@emqx-core-2.emqx-headless.default.svc.cluster.local",
"node_status": "running",
"otp_release": "24.3.4.2-2/12.3.2.2",
"role": "replicant",
"role": "core",
"version": "5.0.20"
},
}
]
```


```bash
$ kubectl get emqx emqx -o json | jq .status.replicantNodes
[
{
"node": "emqx@emqx-core-0.emqx-headless.default.svc.cluster.local",
"node": "emqx@10.244.4.56",
"node_status": "running",
"otp_release": "24.3.4.2-2/12.3.2.2",
"role": "core",
"role": "replicant",
"version": "5.0.20"
},
{
"node": "emqx@emqx-core-1.emqx-headless.default.svc.cluster.local",
"node": "emqx@10.244.4.57",
"node_status": "running",
"otp_release": "24.3.4.2-2/12.3.2.2",
"role": "core",
"role": "replicant",
"version": "5.0.20"
},
{
"node": "emqx@emqx-core-2.emqx-headless.default.svc.cluster.local",
{
"node": "emqx@10.244.4.58",
"node_status": "running",
"otp_release": "24.3.4.2-2/12.3.2.2",
"role": "core",
"role": "replicant",
"version": "5.0.20"
}
]
Expand Down

0 comments on commit 9d40678

Please sign in to comment.