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.
    • Staging 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 staging 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. On the Container Service Kubernetes Cluster page, select the region where the cluster that you want to manage is deployed from the top-navigation bar. Then, select the namespace to which the cluster belongs above the cluster list.
  4. Find the cluster that you want to manage, click the icon and then click Edit Tags.
  5. In the Edit Tags dialog box, click Create, set Tag Key and Tag Value, and then click OK.
    Set the tag key and tag value
    Note A tag consists of a key and a 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 at most 20 tags to each cluster.

Filter resources by tag

  1. On the Container Service Kubernetes Cluster page, click Tag above the cluster list.
  2. In the dialog box that appears, set the Tag Key and Tag Value parameters and click Search.
    Resources with the specified tag are displayed on the current page.