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 index 07acdf0133..efc764d6a7 100644 --- 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 @@ -17,9 +17,6 @@ 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 @@ -37,6 +34,30 @@ You can also do this from the CLI by running: docker node update --label-add = ``` +## Add constraint to a service + +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. + +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. + +You can add deployment constraints to your docker-stack.yml file or when you are creating a stack: +![](../../images/use-contraints-in-stack-deployement.png) + +Or you can apply them when you are creating a service. + +![](../../images/add-constraint-to-service.png) + +You can check if a service have deployment constraints, navigate to the **Services** page, +and choose the service your want to check. +Once you're done, click **Scheduling**. + +![](../../images/check-contraints.png) + +From here, you can add or remove deployment constraint too. + ## 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-constraint-to-service.png b/datacenter/ucp/2.1/guides/images/add-constraint-to-service.png new file mode 100644 index 0000000000..61e62ca50d Binary files /dev/null and b/datacenter/ucp/2.1/guides/images/add-constraint-to-service.png differ diff --git a/datacenter/ucp/2.1/guides/images/check-contraints.png b/datacenter/ucp/2.1/guides/images/check-contraints.png new file mode 100644 index 0000000000..69bfe22782 Binary files /dev/null and b/datacenter/ucp/2.1/guides/images/check-contraints.png differ diff --git a/datacenter/ucp/2.1/guides/images/use-contraints-in-stack-deployement.png b/datacenter/ucp/2.1/guides/images/use-contraints-in-stack-deployement.png new file mode 100644 index 0000000000..326a63990d Binary files /dev/null and b/datacenter/ucp/2.1/guides/images/use-contraints-in-stack-deployement.png differ