How to add or remove label metadata in the swarm node

+1 vote

Hi Team,

I have one swarm node. I want to add one label to this node. So, I can manage the node properly. How to do that?

Dec 28, 2020 in Docker by akhtar
• 38,260 points
4,034 views

1 answer to this question.

0 votes

Node labels provide a flexible method of node organization. You can also use node labels in service constraints. Apply constraints when you create a service to limit the nodes where the scheduler assigns tasks for the service.

You need to pass the --label-add flag once for each node label you want to add.

$ docker node update --label-add foo --label-add bar=baz node-1
node-1
answered Dec 28, 2020 by MD
• 95,460 points

Related Questions In Docker

0 votes
1 answer

How to remove a worker node from the docker swarm cluster?

Hi@akhtar, To remove a worker node from the ...READ MORE

answered Dec 24, 2020 in Docker by MD
• 95,460 points
5,643 views
0 votes
1 answer

How to change node availability in docker swarm?

Hi@akhtar, You can change the node availability according to ...READ MORE

answered Dec 28, 2020 in Docker by MD
• 95,460 points
3,658 views
0 votes
1 answer
+2 votes
1 answer
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
3,995 views
0 votes
1 answer

How to add one worker node to the Docker swarm?

Hi@akhtar, You will get one token when you ...READ MORE

answered Dec 24, 2020 in Docker by MD
• 95,460 points
1,214 views
0 votes
1 answer

How to get the hostname of the manager node in the Docker swarm?

Hi@akhtar, You can find the manager hostname using ...READ MORE

answered Dec 24, 2020 in Docker by MD
• 95,460 points
4,203 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP