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.
Note
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.
When you use native nodes, no fees are charged for EIPs.
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. Choose Node management > Node pool in the left sidebar. On the Node pool list page, click Create node pool.
4. On the Create node pool page, click Model configuration. On the Model configuration page, select Create EIP, as shown below: 5. Click Create node pool.
Using YAML to Enable Public Network Access for Native Nodes
Fields
|
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. |
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
Binding an EIP to a Native Node
Tencent Cloud native nodes support binding to EIPs for public network access. You can configure an EIP for both existing and new nodes in a node pool to meet the network requirements in different scenarios.
Note
EIP ownership: EIPs belong to the corresponding users after unbinding. Users can manage them as needed.
Operation permissions: Make sure that you have the permissions to perform EIP binding and unbinding operations.
Querying the EIP Status
1. Log in to the TKE console, and click Cluster in the left sidebar. 2. On the cluster list page, click the ID of a cluster to enter the cluster details page.
3. Select in the left sidebar Node Management , click the node name on the node page to enter the node detail page.
4. In the host information area, view the IP address, and query the status of the EIP bound to the node, as shown below:
Binding an EIP
1. Log in to the TKE console, and click Cluster in the left sidebar. 2. On the cluster list page, click the ID of a cluster to enter the cluster details page.
3. Select in the left sidebar Node Management , click More on the right of the node on the node page More , and select Bind EIP . As shown below:
4. In the EIP binding pop-up window, select the EIP to be bound, and click Confirm .
Unbinding an EIP
1. Log in to the TKE console, and click Cluster in the left sidebar. 2. On the cluster list page, click the ID of a cluster to enter the cluster details page.
3. In the left sidebar, select Node Management , and then click More > Unbind EIP on the right of the node.
4. Confirm the information for unbinding, and click Confirm.