In cloud-edge collaboration scenarios, edge unit services must handle traffic locally within their own node pools rather than routing it through the cloud. Deploy ack-ingress-nginx-v1 separately in a cloud node pool and an edge node pool so each pool has its own Ingress controller and handles traffic independently.
Prerequisites
Before you begin, ensure that you have:
-
An ACK Edge cluster running Kubernetes 1.19 or later
-
Access to the ACK console
-
The node pool IDs for the cloud and edge node pools you want to target
To find node pool IDs, go to the cluster details page in the ACK console and choose Nodes > Node Pools in the left-side navigation pane.
Usage notes
-
You can deploy
ack-ingress-nginx-v1multiple times in the same ACK Edge cluster. Assign a unique release name to each deployment and use a separate namespace per deployment to isolate operations. -
If you use default settings for the first deployment,
ack-ingress-nginx-v1is deployed in the default node pool of the cluster.
How it works
Each deployment of ack-ingress-nginx-v1 targets a single node pool, identified by the node pool ID set in the nodeSelector parameter. Deploy the controller once in the cloud node pool and once in the edge node pool so that each pool routes traffic locally.
For edge node pools, setting global.edgeNodePool to true makes two automatic changes:
-
The Service type changes from
LoadBalancertoNodePort, because edge nodes do not have access to cloud load balancer infrastructure. -
The NGINX Ingress controller uses a public container image address, preventing pull failures when the cluster cannot reach Alibaba Cloud private image registries.
To expose edge applications to the public internet after deployment, configure a load balancer with a public IP address separately.
Deploy the NGINX Ingress controller
Deploy ack-ingress-nginx-v1 from the ACK Marketplace once for each target node pool. Use a unique release name and unique ingressClassResource values for each deployment to avoid conflicts within the same cluster.
Deploy in a cloud node pool
-
Log on to the ACK console. In the left-side navigation pane, choose Marketplace > Marketplace.
-
On the App Catalog tab, find and click ack-ingress-nginx-v1.
-
On the ack-ingress-nginx-v1 page, click Deploy in the upper-right corner.
-
In the Deploy wizard, set Cluster, Namespace, and Release Name. Use the
ack-ingress-nginx-v1-{node pool name}format for the release name. For example:ack-ingress-nginx-v1-cloud-hangzhou. -
Click Next to go to the Parameters page, then configure the following:
-
In the
nodeSelectorparameter, add the labelalibabacloud.com/nodepool-id: {Node pool ID}. This is the only label required.
-
In the
ingressClassResourceparameter, setnameandcontrollerValueto unique values so multiple deployments in the same cluster do not conflict:
-
name: use theack-nginx-{node pool name}format. For example:ack-nginx-cloud-hangzhou. -
controllerValue: use the"k8s.io/ack-ingress-nginx-{node pool name}"format. For example:"k8s.io/ack-ingress-nginx-cloud-hangzhou".
-
-
-
Click OK.
Deploy in an edge node pool
-
Log on to the ACK console. In the left-side navigation pane, choose Marketplace > Marketplace.
-
On the App Catalog tab, find and click ack-ingress-nginx-v1.
-
On the ack-ingress-nginx-v1 page, click Deploy in the upper-right corner.
-
In the Deploy wizard, set Cluster, Namespace, and Release Name. Use the
ack-ingress-nginx-v1-{node pool name}format for the release name. For example:ack-ingress-nginx-v1-edge-hangzhou. -
Click Next to go to the Parameters page, then configure the following:
-
In the
nodeSelectorparameter, add the labelalibabacloud.com/nodepool-id: {edge node pool ID}. This is the only label required.
-
Set
global.edgeNodePooltotrue. Edge nodes cannot useLoadBalancerservices because cloud load balancer infrastructure is not available at the edge. Setting this parameter changes the Service type toNodePortand configures a public container image address for the controller. To expose edge applications to the public internet after deployment, configure a load balancer with a public IP address.
-
In the
ingressClassResourceparameter, setnameandcontrollerValueto unique values:
-
name: use theack-nginx-{node pool name}format. For example:ack-nginx-edge-hangzhou. -
controllerValue: use the"k8s.io/ack-ingress-nginx-{node pool name}"format. For example:"k8s.io/ack-ingress-nginx-edge-hangzhou".
-
-
-
Click OK.
Verify the deployment
After the deployment completes, confirm that the NGINX Ingress controller is running in the target node pool.
In the left-side navigation pane of the cluster details page, choose Applications > Helm. Confirm that the Helm release you created appears in the list.