Docker swarm labels

Show docker swarm nodes labels
docker node ls -q | xargs docker node inspect -f '{{ .ID }} [{{ .Description.Hostname }}]: {{ .Spec.Labels }}'

Check node id
docker node ls

Remove label
docker node update --label-rm << LABEL_NAME >> << NODE_ID >>

Add label
docker node update --label-add << LABEL_NAME >>=<< LABEL_VALUE >> << NODE_ID >>