Files
Homelab/docs/guides/swarm_label_guide.md

1.2 KiB

Docker Swarm Node Labeling Guide

This guide provides the commands to apply the correct labels to your Docker Swarm nodes, ensuring that services are scheduled on the appropriate hardware.

Run the following commands in your terminal on a manager node to label each of your swarm nodes.

1. Label the Leader Node

This node will run general-purpose applications.

docker node update --label-add leader=true <node-name>

2. Label the Manager Node

This node will run core services like Traefik and Portainer.

docker node update --label-add manager=true <node-name>

3. Label the Heavy Worker Node

This node is for computationally intensive workloads like AI and machine learning.

docker node update --label-add heavy=true <node-name>

4. Label the Fedora Worker Node

This node is the primary heavy worker.

docker node update --label-add heavy=true fedora

Verify Labels

After applying the labels, you can verify them by inspecting each node. For example, to check the labels for a node, run:

docker node inspect <node-name> --pretty

Look for the "Labels" section in the output to confirm the changes.