consul/website/source/docs/commands/join.html.markdown.erb

45 lines
1.6 KiB
Plaintext

---
layout: "docs"
page_title: "Commands: Join"
sidebar_current: "docs-commands-join"
description: |-
The `join` command tells a Consul agent to join an existing cluster. A new Consul agent must join with at least one existing member of a cluster in order to join an existing cluster. After joining that one member, the gossip layer takes over, propagating the updated membership state across the cluster.
---
# Consul Join
Command: `consul join`
The `join` command tells a Consul agent to join an existing cluster.
A new Consul agent must join with at least one existing member of a cluster
in order to join an existing cluster. After joining that one member,
the gossip layer takes over, propagating the updated membership state across
the cluster.
If you don't join an existing cluster, then that agent is part of its own
isolated cluster. Other nodes can join it.
Agents can join other agents multiple times without issue. If a node that
is already part of a cluster joins another node, then the clusters of the
two nodes join to become a single cluster.
## Usage
Usage: `consul join [options] address ...`
You may call join with multiple addresses if you want to try to join
multiple clusters. Consul will attempt to join all addresses, and the join
command will fail only if Consul was unable to join with any.
#### API Options
<%= partial "docs/commands/http_api_options_client" %>
#### Command Options
* `-wan` - For agents running in server mode, the agent will attempt to join
other servers gossiping in a WAN cluster. This is used to form a bridge between
multiple datacenters.