diff --git a/datacenter/ucp/2.1/guides/admin/configure/add-labels-to-cluster-nodes.md b/datacenter/ucp/2.1/guides/admin/configure/add-labels-to-cluster-nodes.md new file mode 100644 index 0000000000..c45a0c368b --- /dev/null +++ b/datacenter/ucp/2.1/guides/admin/configure/add-labels-to-cluster-nodes.md @@ -0,0 +1,42 @@ +--- +title: Add labels to cluster nodes +description: Learn how to add metadata to cluster nodes, that can be used to specify constraints when deploying services. +keywords: Docker, cluster, nodes, labels +--- + +After deploying UCP you can add labels to your nodes. Labels are metadata that +you can use to organize nodes. +You can also use these labels as deployment constraints for your services. + +When deploying a service, you can specify constraints, so that the service only +gets scheduled on a node that has a label that fulfills all the constraints +you specify. + +As an example, you can apply labels based on their role in the development +lifecycle, or the hardware resources they have. + +![](../../images/add-labels-to-cluster-nodes-1.svg) + +In this example, when users deploy a service they can add constraints for the +service to be scheduled on nodes that have an SSD storage. + +## Apply labels to a node + +Log in with administrator credentials in the UCP web UI, navigate to the +**Nodes** page, and choose the node you want to apply labels to. + +Click the **Add label** button, and add one or more labels to the node. + +![](../../images/add-labels-to-cluster-nodes-2.png){: .with-border} + +Once you're done, click **Save Changes**. + +You can also do this from the CLI by running: + +```non +docker node update --label-add = +``` + +## Where to go next + +* [Store logs in an external system](store-logs-in-an-external-system.md) diff --git a/datacenter/ucp/2.1/guides/images/add-labels-to-cluster-nodes-1.svg b/datacenter/ucp/2.1/guides/images/add-labels-to-cluster-nodes-1.svg new file mode 100644 index 0000000000..ad006856a4 --- /dev/null +++ b/datacenter/ucp/2.1/guides/images/add-labels-to-cluster-nodes-1.svg @@ -0,0 +1,139 @@ + + + + add-labels-1 + Created with Sketch. + + + + + Docker swarm + + + + + + + + + worker node + + + + storage=ssd + + + environment=prod + + + + + + + + + + worker node + + + + storage=ssd + + + environment=prod + + + + + + + + + + worker node + + + + storage=ssd + + + environment=test + + + + + + + + + + worker node + + + + storage=disk + + + environment=dev + + + + + + + + + + worker node + + + + storage=disk + + + environment=dev + + + + + + + + + + + + manager node + + + + + + + + + + + manager node + + + + + + + + + + + manager node + + + + + + + + + + + \ No newline at end of file diff --git a/datacenter/ucp/2.1/guides/images/add-labels-to-cluster-nodes-2.png b/datacenter/ucp/2.1/guides/images/add-labels-to-cluster-nodes-2.png new file mode 100644 index 0000000000..24b70a7871 Binary files /dev/null and b/datacenter/ucp/2.1/guides/images/add-labels-to-cluster-nodes-2.png differ