In cloud-edge collaboration scenarios, services within an edge unit process traffic locally, which means traffic is routed within the edge node pool by default. This topic describes how to deploy the Nginx Ingress Controller on both cloud and edge node pools in an ACK Edge cluster to provide load balancing for services within the edge unit.
The open source Ingress-NGINX project will no longer be maintained after March 2026. Consequently, Container Service for Kubernetes will also discontinue maintenance for the Nginx Ingress Controller component. Be aware of the associated risks. For more details, see [Product Announcement] End of Maintenance for the Nginx Ingress Controller Component.
Background
Alibaba Cloud ACK Edge adds non-intrusive enhancements for edge autonomy, edge units, edge traffic management, and native operational API support. It natively supports unified application lifecycle management and unified resource scheduling in edge computing scenarios. You can quickly add your edge nodes to a cluster.
Usage notes
Before deploying ack-ingress-nginx-v1 on a cloud or edge node pool, note the following:
-
The ACK Edge cluster must be version 1.19 or later.
-
You can deploy the component multiple times on the same ACK Edge cluster. Each deployment requires a unique release name. We recommend that you use a separate namespace for each deployment for easier management.
-
If you do not change the parameters during the initial deployment, ack-ingress-nginx-v1 deploys to the default node pool of the ACK Edge cluster.
Procedure
Log on to the ACK console. In the left navigation pane, click .
-
On the Marketplace page, click the App Catalog tab, search for, and then select ack-ingress-nginx-v1.
-
On the ack-ingress-nginx-v1 page, click Deploy in the upper-right corner.
-
In the panel that appears, select a Cluster and a Namespace, and specify a Release Name.
NoteWhen deploying ack-ingress-nginx-v1 to a node pool, we recommend naming the release in the ack-ingress-nginx-v1-{node-pool-name} format. Example: ack-ingress-nginx-v1-edge-hangzhou.
-
Click Next to open the Parameters page and configure the parameters.
In the ACK console, go to the details page of your cluster. In the navigation pane on the left, choose . Find the IDs of the target cloud and edge node pools. You need these IDs to configure the
nodeSelectorparameter.-
To deploy to a cloud node pool, configure the following parameters:
-
In the
nodeSelectorparameter, add the label of the cloud node pool:alibabacloud.com/nodepool-id: {node-pool-ID}.NoteThe
nodeSelectorfield only requires thealibabacloud.com/nodepool-id: {node-pool-ID}label.## nodeSelector: kubernetes.io/os: linux alibabacloud.com/nodepool-id: np-xxxx -
In the
ingressClassResourceparameter, setnameandcontrollerValue.NoteIf you deploy ack-ingress-nginx-v1 multiple times in the same ACK Edge cluster, ensure that the
nameandcontrollerValueare unique for each deployment. We recommend the following naming convention:-
name:ack-nginx-{node-pool-name}. Example:ack-nginx-edge-hangzhou. -
controllerValue:"k8s.io/ack-ingress-nginx-{node-pool-name}". Example:"k8s.io/ack-ingress-nginx-edge-hangzhou".
ingressClassResource: # The name and controllerValue parameters are used instead of ingressClass. # The name can also be used in the kubernetes.io/ingress.class annotation. # To prevent overriding the default ingress class in the add-on, the default value of controllerValue is 'k8s.io/ack-ingress-nginx', # and the default name is 'ack-nginx'. # Please modify both the name and controllerValue parameters to have unique values. name: ack-nginx-edge-hangzhou controllerValue: "k8s.io/ack-ingress-nginx-edge-hangzhou" -
-
-
To deploy to an edge node pool, configure the following parameters:
-
In the
nodeSelectorparameter, add the label of the edge node pool:alibabacloud.com/nodepool-id: {node-pool-ID}.NoteThe
nodeSelectorfield only requires thealibabacloud.com/nodepool-id: {node-pool-ID}label. -
Set
global.edgeNodePooltotrue. The ack-ingress-nginx-v1 component automatically does the following:-
Automatically changes the Service type of the Nginx Ingress Controller on edge nodes from LoadBalancer to NodePort. If you need to expose edge services to the internet, you must separately configure a load balancer with a public IP address.
-
Automatically switches the Nginx Ingress Controller image to a public image. This prevents edge nodes from failing to pull private images.
global: clusterType: "Edge" # For an edge cluster, set this to true if the controller will be deployed in an edge node pool. edgeNodePool: true -
-
In the
ingressClassResourceparameter, setnameandcontrollerValue.NoteIf you deploy ack-ingress-nginx-v1 multiple times in the same ACK Edge cluster, ensure that the
nameandcontrollerValueare unique for each deployment. We recommend the following naming convention:-
name:ack-nginx-{node-pool-name}. Example:ack-nginx-edge-hangzhou. -
controllerValue:"k8s.io/ack-ingress-nginx-{node-pool-name}". Example:"k8s.io/ack-ingress-nginx-edge-hangzhou".
-
-
-
-
Click OK to complete the installation.
-
In the navigation pane on the left of the cluster details page, choose .
On the Helm page, the Nginx Ingress Controller service is now deployed.