When you deploy Kubernetes applications, you may need to attach non-identity metadata to pods for external tools and libraries to consume. Annotations store this metadata as key-value pairs. Annotation values accept both structured and unstructured data, including characters that labels do not allow. Annotations do not affect pod behavior.
Add annotations during deployment
To add annotations to an application pod, complete the following steps:
Log on to the EDAS console.
In the left-side navigation pane, choose Application Management > Applications.
In the top navigation bar, select a region. In the upper part of the page, select a namespace.
From the Cluster Type drop-down list, select Container Service or Serverless Kubernetes Cluster.
Find the target application and click the application name.
In the upper-right corner of the Application Overview page, choose Deploy > Deploy.
On the Select Deployment Mode page, select a deployment mode and click Start Deployment in the upper-right corner of the deployment mode section.
NoteThis example uses the Release to All at Once mode.
On the Release to All at Once page, configure deployment parameters as needed, then click Annotation Configuration to expand the annotation settings.
Add one or more annotation key-value pairs. For example:
Name:
demo-annotationValue:
demo-annotation-value
Click OK.
Verify annotations
After the application is deployed, run the following kubectl command to check the annotation configuration:
kubectl get podThe demo-annotation: demo-annotation-value key-value pair appears in the metadata.annotations field of the application pod.
See also
For other parameters available when you create or deploy an application, see Create a Kubernetes application by using the default application source.