consul/website/content/commands/join.mdx

41 lines
1.3 KiB
Plaintext
Raw Normal View History

2014-02-08 00:41:03 +00:00
---
layout: commands
2020-04-07 18:55:19 +00:00
page_title: 'Commands: Join'
sidebar_title: join
description: >-
2020-04-07 18:55:19 +00:00
The `join` command tells a Consul agent to join an existing cluster. A new
Consul agent may join any node in the existing cluster. After joining with one
member, the gossip communication will propagate the updated membership state
across the cluster.
2014-02-08 00:41:03 +00:00
---
# Consul Join
2014-02-08 00:41:03 +00:00
Command: `consul join`
2014-02-08 00:41:03 +00:00
The `join` command tells a Consul agent to join an existing cluster.
A new Consul agent may join any node in the existing cluster. After joining
with one member, the gossip communication will propagate the updated membership
state across the cluster.
2014-02-08 00:41:03 +00:00
An agent which is already part of a cluster may join an agent in a different
cluster, causing the two clusters to be merged into a single cluster.
2014-02-08 00:41:03 +00:00
## Usage
Usage: `consul join [options] address ...`
2014-02-08 00:41:03 +00:00
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.
2014-02-08 00:41:03 +00:00
#### API Options
2020-04-07 18:55:19 +00:00
@include 'http_api_options_client.mdx'
#### Command Options
2014-02-08 00:41:03 +00:00
2020-04-07 18:55:19 +00:00
- `-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.