Help & Documentation>Tencent Kubernetes Engine

Enabling Public Network Access for a Native Node

Last updated: 2023-09-26 11:20:37

Note:
Bill-by-CVM accounts cannot be used to enable public network access for native nodes. For more information, see Account Types. If you use a bill-by-CVM account, you can submit a ticket to upgrade your account.
This document describes how to bind a node to an elastic IP (EIP) and enable public network access for the node in the TKE console or using YAML.

Supports and Limits

In a node pool with public network access enabled, each time a native node is created, an EIP is automatically created and bound to the node.
The EIP bound to a node has the same lifecycle as the node.
Native nodes do not incur additional charges for EIPs. For EIP billing details, please refer to Elastic IP Billing Description.

Using the Console to Enable Public Network Access for Native Nodes

1. Log in to the TKE console and select Cluster in the left sidebar.
2. On the cluster list page, click the ID of the target cluster to go to the details page.
3. In the left sidebar, select Node Management > Node Pools. On the Node Pools page, click Create Native Node Pool.
4. On the Create Node Pool page, click Instance Configuration. In the Instance Configuration page, select the Create Elastic IP checkbox, as shown in the following image:



5. Click Create node pool.

Using YAML to Enable Public Network Access for Native Nodes

Fields

Field
Field Value
Description
spec.template.spec.providerSpec.value.internetAccessible
addressType
EIP: If this field is left empty, a standard EIP is used.
HighQualityEIP: A BGP IP (dedicated EIP) is used.
chargeType
Billing mode:
TrafficPostpaidByHour: Postpaid by traffic on an hourly basis.
BandwidthPostpaidByHour: Postpaid by bandwidth on an hourly basis.
BandwidthPackage: Paid by shared bandwidth package. The EIP must be in the allowlist of the bandwidth package.
maxBandwidthOut
Maximum bandwidth in Mbps.
bandwidthPackageID
ID of the shared bandwidth package.
Note
For more information on EIP types and considerations, please refer to Applying for an EIP.
Premium EIPs are currently only supported for Bill-by-IP accounts, available in the Hong Kong, China region, and billed using Shared Bandwidth Packages. If you do not have a premium BGP bandwidth package, you can create one in the Virtual Private Cloud Console > Shared Bandwidth Packages.

YAML sample

apiVersion: node.tke.cloud.tencent.com/v1beta1
kind: MachineSet
spec:
deletePolicy: Random
displayName: HighQualityEIP-test
instanceTypes:
- SA2.MEDIUM2
replicas: 1
scaling:
createPolicy: ZonePriority
maxReplicas: 4
subnetIDs:
- subnet-xxxxxxx
template:
metadata:
labels:
node.tke.cloud.tencent.com/machineset: np-ohh7gaek
spec:
providerSpec:
type: Native
value:
instanceChargeType: PostpaidByHour
lifecycle: {}
management:
nameservers:
- 183.60.83.19
- 183.60.82.98
metadata:
creationTimestamp: null
securityGroupIDs:
- sg-5lxe2r2p
systemDisk:
diskSize: 50
diskType: CloudPremium
internetAccessible:
chargeType: BandwidthPackage
bandwidthPackageID: bwp-95xr2686
maxBandwidthOut: 100
addressType: HighQualityEIP
runtimeRootDir: /var/lib/containerd
type: Native