
Viewing the Current Cluster
On your server node (consul-node-a), verify the existing members and Raft peers:
consul-node-a is the Raft leader, while consul-node-b is a follower. Maintaining at least three servers is recommended for high availability.Cluster Members Overview
| Node | Address | Status | Type | DC | Segment |
|---|---|---|---|---|---|
| consul-node-a | 10.0.101.110:8301 | alive | server | us-east-1 | <all> |
| consul-node-b | 10.0.101.248:8301 | alive | server | us-east-1 | <all> |
Adding a New Client Agent
-
Prepare the client config
On your new machine (web-server-01), create/etc/consul.d/config.hcl: -
Start the Consul agent
-
Verify local membership
Expected:
-
Join the cluster
-
Confirm membership across the cluster
All nodes:
For automatic retries, add a
retry_join block in your client config. You can also leverage cloud auto-join or gossip keys—see Consul auto-join for details.Removing a Client Agent
Graceful Leave
On the client (web-server-01), run:
left:
Forceful Removal
If a client is unresponsive or destroyed, useforce-leave with pruning:
force-leave is destructive and should only be used when an agent cannot leave gracefully. It immediately prunes the node from the membership list.