mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
doc: use 2379 as port of the first member in local cluster
This commit is contained in:
parent
2dc06787ae
commit
328c42f1b7
@ -37,7 +37,7 @@ $ goreman -f Procfile start
|
||||
...
|
||||
```
|
||||
|
||||
The started members listen on `localhost:12379`, `localhost:22379`, and `localhost:32379` for client requests respectively.
|
||||
The started members listen on `localhost:2379`, `localhost:22379`, and `localhost:32379` for client requests respectively.
|
||||
|
||||
To interact with the started cluster by using etcdctl:
|
||||
|
||||
@ -49,12 +49,12 @@ $ etcdctl --write-out=table --endpoints=localhost:12379 member list
|
||||
+------------------+---------+--------+------------------------+------------------------+
|
||||
| ID | STATUS | NAME | PEER ADDRS | CLIENT ADDRS |
|
||||
+------------------+---------+--------+------------------------+------------------------+
|
||||
| 8211f1d0f64f3269 | started | infra1 | http://127.0.0.1:12380 | http://127.0.0.1:12379 |
|
||||
| 8211f1d0f64f3269 | started | infra1 | http://127.0.0.1:2380 | http://127.0.0.1:2379 |
|
||||
| 91bc3c398fb3c146 | started | infra2 | http://127.0.0.1:22380 | http://127.0.0.1:22379 |
|
||||
| fd422379fda50e48 | started | infra3 | http://127.0.0.1:32380 | http://127.0.0.1:32379 |
|
||||
+------------------+---------+--------+------------------------+------------------------+
|
||||
|
||||
$ etcdctl --endpoints=localhost:12379 put foo bar
|
||||
$ etcdctl put foo bar
|
||||
OK
|
||||
```
|
||||
|
||||
@ -64,10 +64,10 @@ To exercise etcd's fault tolerance, kill a member:
|
||||
# kill etcd2
|
||||
$ goreman run stop etcd2
|
||||
|
||||
$ etcdctl --endpoints=localhost:12379 put key hello
|
||||
$ etcdctl put key hello
|
||||
OK
|
||||
|
||||
$ etcdctl --endpoints=localhost:12379 get key
|
||||
$ etcdctl get key
|
||||
hello
|
||||
|
||||
# try to get key from the killed member
|
||||
|
Loading…
x
Reference in New Issue
Block a user