When you manually create resources (such as EC2 instances) on AWS, you have an option to add custom tags that help you track these resources. Likewise, when creating clusters, you can instruct the cloud controller to tag the resources that it creates on your behalf on AWS.
The tags added during cluster creation will be displayed on AWS, allowing you to track your AWS resources:
- security groups
- route tables
You can use tags to categorize your AWS resources by purpose, owner, and so on. Tags come in especially handy when you are using a corporate AWS account and you want to quickly identify which AWS resources belong to your cluster(s). In fact, your corporate AWS admin may require you to tag all the AWS resources that you create, in particular resources, such as EC2 instances, which incur charges.
You can add tags when creating a cluster. The Tags option is available in the GENERAL CONFIGURATION section after you expand SHOW ADVANCED OPTIONS.
Similarly, you can add tags when creating a cluster via CLI.
- It is not possible to add tags after your cluster has been created.
- When you clone your cluster, tags associated with the source cluster will be added to the template of the clone.
- When you save a cluster template, tags will be saved as part of the template, and they will be listed on the cluster template page.
In the cloud controller, tags associated with a given cluster during cluster creation are visible on the cluster details page under a Tags tab. For example:
The same tags will be displayed in the Tags tab on AWS. For example, if you navigate to the EC2 Console, you can see them among other tags associated with your cluster EC2 instances:
Furthermore, you can search for these tags on the Tags page in the EC2 Console:
The following restrictions apply to tags:
- You can add up to 50 tags per cluster.
- The key can include up to 127 characters.
- The value can include up to 255 characters.
- You can use any of the following characters: letters, digits, whitespace,
- The key and value cannot be prefixed with
aws:. For more information, refer to AWS documentation.
- AWS and the cloud controller automatically create certain tags for your resources and these tags take precedence over your custom tags. If you add a tag with a key that already exists for a given resource (i.e. it was added automatically by AWS or cloud controller), your duplicate tag will not be applied to that resource.
For a complete list of restrictions, refer to Tag Restrictions in AWS documentation.
Automatically Generated Tags
All EC2 instances created by cloud controller have the following automatically generated tags:
If you add custom tags that have keys that are identical as these automatically generated tags, the custom tags will not be applied.