Add annotations to Elastic Container Instance (ECI)-based pods to enable ECI-specific features. This reference lists all supported annotations, organized by category.
Important
These annotations apply only to pods scheduled to virtual nodes. They have no effect on pods scheduled to real nodes.
How to apply annotations
Annotations must be set at pod creation time. Adding or modifying annotations on an existing pod has no effect.
In most cases, you work with Deployments rather than bare pods. Place annotations in the spec.template.metadata.annotations field:
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 1
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
annotations:
k8s.aliyun.com/eci-use-specs: "2-4Gi"
spec:
...
Annotations set at creation time
Annotations added after scheduling
After the system schedules resources and creates a pod, ECI adds the following read-only annotations. Run kubectl describe pod <pod-name> to view them.
| Annotation | Example | Description |
|---|---|---|
k8s.aliyun.com/eci-request-id |
45942504-4688-51BA-BBAB-4B692C4F39C0 |
The request ID for the pod creation call. |
k8s.aliyun.com/eci-instance-id |
eci-2ze1y0la40qgva09**** |
The ECI instance ID (pod ID). |
k8s.aliyun.com/eci-instance-spec |
2.0-4.0Gi |
The specifications of the pod. If the value is a vCPU-and-memory size (for example, 2.0-4.0Gi), billing is based on vCPU and memory. If the value is an ECS instance type (for example, ecs.c6.large), billing is based on that instance type. |
k8s.aliyun.com/eci-instance-compute-category |
economy |
The compute category of the ECS instance type used to create the pod. economy pods are billed at the economy compute category rate; general pods are billed at the general compute category rate. |
k8s.aliyun.com/allocated-eipInstanceId |
eip-bp1q5n8cq4p7f6dzu**** |
The ID of the EIP associated with the pod. |
k8s.aliyun.com/allocated-eipAddress |
47.99.. |
The EIP address associated with the pod. |
k8s.aliyun.com/allocated-ipv6Address |
2001:d**:1:1:1:1:1:1 |
The IPv6 address assigned to the pod. |
k8s.aliyun.com/eci-created-by-template |
true |
Whether the pod was created from a template. |
k8s.aliyun.com/eni-instance-id |
eni-2ze6d7oo5ukqj26o**** |
The ID of the elastic network interface (ENI) bound to the pod. |
k8s.aliyun.com/eci-vpc |
vpc-2zeghwzptn5zii0w7**** |
The VPC to which the pod belongs. |
k8s.aliyun.com/eci-matched-image-cache |
imc-2zedy3v37800iimu**** |
The ID of the image cache matched during pod creation. |
k8s.aliyun.com/eci-schedule-result |
finished |
Retired. For scheduling results, see ContainerInstanceCreated. |