Currently, EKS allows you to bind an EIP to a Pod simply by declaring it in the template annotations. For more information, please see Annotation.
There are four annotations related to EIP:
|Annotation Key||Annotation Value and Description||Required|
||It indicates that the workload's Pod needs to be bound to an EIP. If the value is
||Yes if you want to bind an EIP|
||It indicates whether to repossess the EIP after the Pod is deleted.
||If the value is
||It indicates that an existing EIP will be used, and only StatefulSets are supported. After the Pod is terminated, its EIP will not be repossessed by default. Note that the number of StatefulSet Pods cannot exceed the number of
eks.tke.cloud.tencent.com/eip-attributes: ""flag under the
annotationof the corresponding workload or Pod as follows:
kubectl describe pod [name]
You can see that there are two new events related to the EIP as shown below, which indicate a success.
3. View the log file, and you can see that the datasets can be downloaded normally as shown below:
The daily number of EIPs that can be applied for is limited, so EIP is not suitable for tasks that need to run multiple times every day.