22.3k views
5 votes
How do you perform a Docker swarm manager setup?

A) docker swarm setup

B) docker init-swarm

C) docker swarm init

D) docker manager init-swarm

User Skunkfrukt
by
7.6k points

1 Answer

3 votes

Final answer:

To set up a Docker swarm manager, use the command 'docker swarm init'. This initializes the current node as a swarm manager. Additional setup steps might be required for advanced configurations.

Step-by-step explanation:

To perform a Docker swarm manager setup, the correct command is C) docker swarm init. When you execute this command on a Docker-enabled host, you initialize the current node as a manager in a new Swarm cluster. If the swarm already exists and you want to add a manager to it, you would first need to get a token from an existing manager node by running docker swarm join-token manager and then use the output command on the new node you want to set as a manager.

Here's a quick guide on setting up your first manager:

  1. Open a terminal on the host where you want to run your manager.
  2. Type docker swarm init and press Enter.
  3. Follow the instructions on screen to complete the setup, such as noting down the join token for worker or manager nodes.

Do note that additional configuration might be required for more advanced swarm setup, such as specifying network options or configuring multiple manager nodes for high availability.

User Asadullah Ali
by
8.7k points