How do you upgrade swarm managers and agents?

How do you avoid downtime when performing an upgrade? Is there a host maintenance mode? Is there a deployment tool that will update all agents or do you have to go to each host and update the swarm agent individually?

What is meant by upgrade? Add more nodes? Or, upgrade the version?

Upgrade the version of Swarm Manager and Agent software.

I understand that when new nodes are added that the cluster is not rebalanced.

The Docker version would also need to be updated. Reinstalling the swarm manager and joining the updated version swarm agents would be easier than upgrading.