Predefined constraints using metadata
This mechanism enables a service to be runn on a machine having matching metadata configured in the metadata
parameter of the coreos.fleet
section. Metadata can be used to describe a member properties such as disk type, region, platform, and special member property like exposed public IPs and so on. Since it is provided as a multiple key-value pair, the flexibility it provides is immense for defining a member.
The metadata can then also be used to associate services to be run on those members. For instance, we can say that a particular service is supposed to run on members that are running in a particular region and/or having a particular disk type and/or having a particular member type (bare metal, cloud, and so on) and/or having a particular provider (machine vendor, cloud provider, and so on).
In our example, we will create three members, each having their own metadata, and then bind the service to run on a metadata matching its property. The following...