Information
You should ensure that the minimum number of required manager nodes is created in a swarm.
Manager nodes within a swarm have control over the swarm and can change its configuration, including modifying security parameters. Having excessive manager nodes could render the swarm more susceptible to compromise.
If fault tolerance is not required in the manager nodes, a single node should be elected as a manger. If fault tolerance is required then the smallest odd number to achieve the appropriate level of tolerance should be configured. This should always be an odd number in order to ensure that a quorum is reached.
Solution
If an excessive number of managers is configured, the excess nodes can be demoted to workers using the following command:
docker node demote <ID>
Where <ID> is the node ID value of the manager to be demoted.
Impact:
None