When creating an ECI pod (an ECI instance) in a Kubernetes cluster, you can add annotations to leverage ECI features without changing Kubernetes semantics. This topic covers both the annotations you can add and those automatically added after pod scheduling.
ECI pod annotations
ECI pods support the following annotations:
-
These annotations apply only to Pods scheduled on virtual nodes (ECI instances) and do not affect Pods on regular nodes.
-
Add annotations to a Pod's
metadata. For example, when creating a Deployment, add the annotations underspec>template>metadata. -
Elastic Container Instance-related annotations are only applied when a pod is created. Adding or modifying these annotations on an existing pod will have no effect.
ECI pod annotations
The following table lists the annotations added to an ECI Pod after it is scheduled. You can query these annotations by running the kubectl describe command.
|
Parameter |
Example value |
Description |
|
k8s.aliyun.com/eci-request-id |
45942504-4688-51BA-BBAB-4B692C4F39C0 |
The request ID. |
|
k8s.aliyun.com/eci-instance-id |
eci-2ze1y0la40qgva09**** |
The ECI instance ID. |
|
k8s.aliyun.com/eci-instance-spec |
2.0-4.0Gi |
The ECI instance specification used for billing.
|
|
k8s.aliyun.com/eci-instance-compute-category |
economy |
The compute category of the ECI instance specification.
|
|
k8s.aliyun.com/allocated-eipInstanceId |
eip-bp1q5n8cq4p7f6dzu**** |
The ID of the associated EIP. |
|
k8s.aliyun.com/allocated-eipAddress |
47.99.**.** |
The IP address of the associated EIP. |
|
k8s.aliyun.com/allocated-ipv6Address |
2001:d**:1:1:1:1:1:1 |
The associated IPv6 address. |
|
k8s.aliyun.com/eci-created-by-template |
true |
Indicates whether the ECI instance was created from a template. |
|
k8s.aliyun.com/eni-instance-id |
eni-2ze6d7oo5ukqj26o**** |
The ID of the associated elastic network interface. |
|
k8s.aliyun.com/eci-vpc |
vpc-2zeghwzptn5zii0w7**** |
The VPC ID. |
|
k8s.aliyun.com/eci-matched-image-cache |
imc-2zedy3v37800iimu**** |
The ID of the matched image cache. |
|
k8s.aliyun.com/eci-schedule-result |
finished |
The scheduling result. This annotation is deprecated. Instead, refer to the ContainerInstanceCreated condition in podStatus.conditions. For more information, see ContainerInstanceCreated. |