All Products
Search
Document Center

Enterprise Distributed Application Service:Configure annotations

Last Updated:Jan 08, 2024

In Kubernetes, you can attach metadata to application pods by configuring annotations. This helps store additional information and facilitates query of information by using tools and libraries without affecting pod running. Annotation values support both structured and unstructured data and can contain characters that are not allowed in tags. This topic describes how to attach non-identity metadata to an application when you deploy the application.

Procedure

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, click Application Management > Applications. In the top navigation bar, select a region. In the upper part of the page, select a namespace. Select Container Service or Serverless Kubernetes Cluster from the Cluster Type drop-down list. Then, find the application that you want to deploy and click the application name.

  3. In the upper-right corner of the Application Overview page, choose Deploy > Deploy.

  4. On the Select Deployment Mode page, select a deployment mode and click Start Deployment in the upper-right corner of the deployment mode section.

    Note

    In this example, Release to All at Once is used.

  5. On the Release to All at Once page, modify deployment parameters based on your business requirements and click Annotation Configuration to configure key-value pairs. Then, click OK.

    Sample annotation:

    • Set Name to demo-annotation.

    • Set Value to demo-annotation-value.

    After the application is deployed, run the following kubectl command to query the annotation configurations of the application:

    kubectl get pod

    In the command output, the demo-annotation: demo-annotation-value key-value pair appears in the metadata.annotations field of the application pod.

References

For information about other parameters that are used when you create or deploy an application, see Create a Kubernetes application by using the default application source.