Demoting a node
You can demote any manager node to a worker node at any time. To demote a node, run the below command on the manager node-
$ docker node demote NODE
Example-
root@master:~# docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION
buc72h0hyo66gcilq7melh9pq * master Ready Active Leader 20.10.11
xvdyauu8t83r3udrqh6c5w8a8 worker01 Ready Active Reachable 20.10.11
xctiaq0n14aew1falekqybq53 worker02 Ready Active Reachable 20.10.11
here all the node is manager node you can see in manager status. You can use node inspect command to check node status whether it's a manager or a worker node -
root@master:~# docker node demote worker01 worker02
Manager worker01 demoted in the swarm.
Manager worker02 demoted in the swarm.
root@master:~# docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION
buc72h0hyo66gcilq7melh9pq * master Ready Active Leader 20.10.11
xvdyauu8t83r3udrqh6c5w8a8 worker01 Ready Active 20.10.11
xctiaq0n14aew1falekqybq53 worker02 Ready Active 20.10.11
root@master:~#