I use the API to auto-register docker hosts to a Rancher environment and it works well. Hosts in our case are maintained in AWS via an auto-scaling group which runs a user-data script to do the work. We have a number of these for different types of hosts (see below).
However, I also create a number of differently categorised hosts which are differentiated by a label. Those labels are used by scheduling rules. Problem is I have been unable to find a way of creating the label at the time I auto-register the host.
Taking an example, let’s say I want to create a label called HOST_TYPE with a value of LB. How can I do that at the same time as registering the host, fully automated ?