Enterprise Distributed Application Service (EDAS) allows you to add tags to a resource. You can use tags to mark and classify resources. This facilitates the management of resources in the EDAS console. This topic describes how to add tags to Kubernetes clusters and how to filter Kubernetes clusters by tag.

Background information

Tags are used to identify cloud resources. You can use tags to mark, search, and group resources. This facilitates the management of resources. You can add one or more tags to each resource.

If you have deployed a large number of resources such as applications, Kubernetes clusters, and Elastic Compute Service (ECS) instances in EDAS, you can use tags to group these resources. This way, you can use tags to filter resources and perform operations on multiple resources at a time.

  • Tags can be used to indicate different environments.
    • Test environment: You can specify a key-value pair such as Environment=TEST to create a tag and add it to resources that are in the test environment.
    • Development environment: You can specify a key-value pair such as Environment=DEV to create a tag and add it to resources that are in the development environment.
    • Production environment: You can specify a key-value pair such as Environment=PROD to create a tag and add it to resources that are in the production environment.
  • Tags can be used to indicate different teams or projects.
    • Team 1 or Project 1: You can specify a key-value pair such as Team=team1 to create a tag and add it to resources that belong to Team 1 or Project 1.
    • Team 2 or Project 2: You can specify a key-value pair such as Team=team2 to create a tag and add it to resources that belong to Team 2 or Project 2.

Create and add a tag to a resource

  1. Log on to the EDAS console.
  2. In the left-side navigation pane, choose Resource Management > Container Service Kubernetes Clusters.
  3. In the top navigation bar, select a region where the cluster that you want to manage is deployed. On the Container Service Kubernetes Cluster page, select the microservice namespace to which the cluster belongs from the Microservice Namespace drop-down list.
  4. Find the cluster that you want to manage, click the icon, and then click Edit Tags in the Actions column.
  5. In the Edit Tags dialog box, click Create, set the Tag Key and Tag Value parameter, and then click OK.
    Set the tag key and tag value
    Note A tag consists of a key-value pair, which includes a tag key and a tag value. When you create a tag, take note of the following rules:
    • The tag key cannot start with acs:, http://, or https://.
    • The tag key or tag value can be up to 128 characters in length, and can contain letters, digits, hyphens (-), commas (,), asterisks (*), forward slashes (/), question marks (?),and colons (:).
    • The tag key of tags that are added to the same resource must be unique.
    • You can add up to 20 tags to each cluster.

Filter resources by tag

  1. On the Container Service Kubernetes Cluster page, click Tag.
  2. In the dialog box that appears, set the Tag Key and Tag Value parameters and click Search.
    The resources to which the specified tag is added appear.