Create and manage edge node pools

更新时间:
复制 MD 格式

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

Step 1: Install and configure add-ons

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. On the Clusters page, click the name of your cluster. In the left navigation pane, click Components and Add-ons.

  3. 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/24 container 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
  4. Install the terway-hybrid, yurt-hub-controlplane, yurt-coredns-controlplane, and raven-controlplane add-ons with default settings.

  5. Install the raven-agent-ds add-on. Select Enable Proxy Mode. Use accessControlListEntry to restrict public IP access if needed

  6. Configure the kube-apiserver component. In featureGates, enter EdgeProxyCrossNetDomainAccessToRaven=true.

  7. Configure the kube-controller-manager component. In featureGates, enter NodeAutonomyPodProtection=true.

Step 2: Create an edge node pool

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. On the Clusters page, click the name of your cluster. In the left navigation pane, click Nodes > Node Pools.

  3. 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).

  4. After the node pool is created, you can modify some configuration items in the console.

Step 3: Add edge nodes

  1. On the Clusters page, click the name of your cluster. In the left navigation pane, click Cluster Information.

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

  3. 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:

    1. Add Existing: For nodes that are already registered as Alibaba Cloud managed instances (Cloud Assistant installed).

      1. Select the target nodes and click OK to add them to the edge node pool.

    2. Manual: For nodes that have a registration code created but do not have Cloud Assistant installed yet.

      1. 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 ID
      2. In the console, enter the Activation Code ID and Activation Code, and then click OK to generate the edge node pool installation script.

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

Important

Removing an edge node only removes it from the node pool. It does not affect the management status of the Alibaba Cloud managed instances.

  1. On the Clusters page, click the name of your cluster. In the left navigation pane, click Nodes > Node Pools.

  2. Click the name of the target edge node pool. Select the node to remove. In the Actions column, click image.png > 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: