tencent cloud

Feedback

Using EIP to Access Public Network

Last updated: 2023-03-14 18:19:11
Currently, TKE Serverless allows you to bind an EIP to a Pod simply by declaring it in the template annotations. For more information, see Annotation.
Annotations related to EIP are described as follows:
Annotation Key
Annotation Value and Description
Required
eks.tke.cloud.tencent.com/eip-attributes
It indicates that the workload's Pod needs to be bound to an EIP. If the value is "", the binding will be created with the default EIP configuration. You can enter the EIP's TencentCloud API parameter JSON string in "" to customize the configuration.
Yes if you want to bind an EIP
eks.tke.cloud.tencent.com/eip-claim-delete-policy
It indicates whether to repossess the EIP after the Pod is deleted. Never indicates not to repossess. The default value is to repossess.
No
eks.tke.cloud.tencent.com/eip-id-list
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 eipId values specified in this annotation.
No
1. If you want to bind an EIP to a workload or Pod for public network access, the simplest way is to add the eks.tke.cloud.tencent.com/eip-attributes: "" flag under the annotation of the corresponding workload or Pod as follows:
metadata:
name: tf-cnn
annotations:
eks.tke.cloud.tencent.com/eip-attributes: "" # EIP is required, and all are the default configuration

2. Run the following command to view the relevant events:
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:

Note
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.

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support