You can use edge node pools in an ACK managed Pro cluster to integrate on-premises servers or edge computing devices into your cluster. This allows you to orchestrate cloud and edge resources uniformly without requiring a dedicated leased line to an Alibaba Cloud VPCACK managed Pro cluster to create an edge node pool. Then add your on-premises servers or edge devices to the cluster while maintaining unified orchestration and leveraging your existing IT assets.
Prerequisites
An ACK managed Pro cluster (version 1.33 or later) is created, with Expose the Kubernetes API server to the Internet.
A registration code is created for the edge node, and the installation script is saved. The registration region must be the same as the cluster region.
Step 1: Install and configure add-ons
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, click the name of your cluster. In the left navigation pane, click Components and Add-ons.
Install the terway-hybrid-controlplane add-on.
Parameter
Description
RemoteContainerCIDR
The container CIDR block used by the edge node pool. It must not overlap with existing VPC, Service, or pod CIDR blocks.
RemoteContainerCIDRMaskSize
The mask size of the container CIDR block allocated to each node in the edge node pool. For example, setting it to 24 assigns each node a
xxx.xxx.xxx.0/24container CIDR block that supports up to 256 pod IP addresses.Enable SNAT
Enable this to translate pod IPs to the node IP for outbound external traffic.
If disabled, ensure your external network devices can route
Install the terway-hybrid, yurt-hub-controlplane, yurt-coredns-controlplane, and raven-controlplane add-ons with default settings.
Install the raven-agent-ds add-on. Select Enable Proxy Mode. Use accessControlListEntry to restrict public IP access if needed
Configure the kube-apiserver component. In featureGates, enter
EdgeProxyCrossNetDomainAccessToRaven=true.Configure the kube-controller-manager component. In featureGates, enter
NodeAutonomyPodProtection=true.
Step 2: Create an edge node pool
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, click the name of your cluster. In the left navigation pane, click .
On the Node Pools page, click ... > Create Edge Node Pool next to Create Node Pool. Configure the following parameters:
Node Pool Name
Network Plug-in:
Use CNI (Terway-Hybrid): Designed specifically for edge node pools. Ensures network connectivity between cloud and edge pods.
Configure CNI: If you need specific features from a CNI plugin, ACK supports custom CNI plugin.
Network Type:
Overlay: The Terway-Hybrid Overlay mode. Simple to configure and deploy, with no special requirements for the underlying network.
Edge node pools support only Overlay mode.
Inter-node Connection: Specify whether all nodes in the edge node pool have Layer 3 network connectivity. This setting cannot be changed after the node pool is created.
CoreDNS: Whether to enable a dedicated CoreDNS resolution service for the edge node pool (implemented based on the cluster yurt-coredns-controlplane add-on).
After the node pool is created, you can modify some configuration items in the console.
Step 3: Add edge nodes
On the Clusters page, click the name of your cluster. In the left navigation pane, click Cluster Information.
On the Cluster Information page, click the Basic Information tab. Click the ID next to Control Plane Security Group to add the public IP addresses of the edge nodes to the allowlist.
Add edge nodes to the node pool. Two methods are available, depending on whether the Cloud Assistant plug-in is installed on the edge node:
Add Existing: For nodes that are already registered as Alibaba Cloud managed instances (Cloud Assistant installed).
Select the target nodes and click OK to add them to the edge node pool.
Manual: For nodes that have a registration code created but do not have Cloud Assistant installed yet.
Obtain the Activation Code ID and Activation Code from the installation script that was saved when the registration code was created:
sudo aliyun-service --register --RegionId "******" \ --ActivationCode "a-******" \ # Activation code --ActivationId "CAD3******" # Activation IDIn the console, enter the Activation Code ID and Activation Code, and then click OK to generate the edge node pool installation script.
Run the edge node pool installation script on the node to install Cloud Assistant and join the edge node pool.
Follow-up operations
Schedule workloads to the edge node pool
Nodes in an edge node pool have the following default labels and taints to prevent impact on existing workloads in the ACK cluster:
apiVersion: v1
kind: Node
metadata:
labels:
alibabacloud.com/nodepool-type: edge
...
spec:
taints:
- effect: NoSchedule
key: nodepool-type
value: "edge"
...To schedule workloads on edge nodes, add a toleration for this taint:
If you want edge nodes to accept regular workloads, you can remove the taint. However, do not remove the default label alibabacloud.com/nodepool-type: edge. Removing this label will break core edge functionalities.apiVersion: apps/v1
kind: Deployment
metadata:
name: deployment
spec:
replicas: 1
selector:
matchLabels:
app: deployment
template:
metadata:
labels:
app: deployment
spec:
tolerations: # Tolerate edge node pool taint
- key: "nodepool-type"
operator: "Equal"
value: "edge"
effect: "NoSchedule"
...Remove edge nodes
Removing an edge node only removes it from the node pool. It does not affect the management status of the Alibaba Cloud managed instances.
On the Clusters page, click the name of your cluster. In the left navigation pane, click .
Click the name of the target edge node pool. Select the node to remove. In the Actions column, click
> Remove.
Limitations
Edge node pools are compatible with certain operating systems. For the compatibility list, see Operating system compatibility.
Related documents
For information about the components used by edge node pools and their release notes, see: