In cloud-edge collaboration scenarios, access to services that run on an edge computing unit is controlled within a closed loop. You can deploy the NGINX Ingress controller in edge node pools and on-cloud node pools to provide load balancing for services that are deployed on edge computing units. This topic describes how to deploy the NGINX Ingress controller in edge node pools and on-cloud node pools in an ACK Edge cluster.
Background information
ACK Edge provides features such as node autonomy, edge computing units, edge traffic management, and support for open source O&M APIs. You can use these features without making application-facing changes. The features can help you manage application lifecycles and schedule resources in a native and centralized manner in edge computing scenarios. You can add edge nodes to an ACK Edge cluster in a few steps.
Usage notes
Take note of the following items when you deploy ack-ingress-nginx-v1 in edge node pools and on-cloud node pools:
The Kubernetes version of the ACK Edge cluster must be 1.19 or later.
You can deploy ack-ingress-nginx-v1 in an ACK Edge cluster multiple times. To do this, you must specify a unique release name each time you deploy ack-ingress-nginx-v1.
You can deploy ack-ingress-nginx-v1 in a namespace in an ACK Edge cluster multiple times. To facilitate management, we recommend that you select a different namespace each time you deploy ack-ingress-nginx-v1.
If you use the default settings during the first time you deploy ack-ingress-nginx-v1 in an ACK Edge cluster, ack-ingress-nginx-v1 is deployed in the default node pool of the cluster.
Procedure
Log on to the ACK console.
In the left-side navigation pane of the ACK console, choose .
On the App Catalog tab of the Marketplace page, find and click ack-ingress-nginx-v1.
On the ack-ingress-nginx-v1 page, click Deploy in the upper-right corner of the page.
In the Deploy wizard, set the Cluster, Namespace, and Release Name parameters.
NoteWhen you deploy ack-ingress-nginx-v1 in a node pool, we recommend that you specify the release name in the ack-ingress-nginx-v1-{Node pool name} format. Example: ack-ingress-nginx-v1-edge-hangzhou.
Click Next to set the parameters on the Parameters wizard page.
You must obtain the ID of the edge node pool and the ID of the on-cloud node pool. To obtain the IDs, go to the details page of the cluster in the ACK console and choose in the left-side navigation pane. Then, you can view the node pool IDs in the node pool list.
Set the parameters based on the following description when you deploy ack-ingress-nginx-v1 in an on-cloud node pool:
Add the following label to the
service. nodeSelector
parameter:alibabacloud.com/nodepool-id {Node pool ID}
.NoteYou need to specify only
alibabacloud.com/nodepool-id: {Node pool ID}
in theservice. nodeSelector
parameter.Set the
name
andcontrollerValue
fields in theingressClassResource
parameter.NoteIf you want to deploy ack-ingress-nginx-v1 in an ACK Edge cluster multiple times, you must specify unique values for the
name
andcontrollerValue
fields each time you deploy ack-ingress-nginx-v1. Set the fields based on the following description:Set
name
in theack-nginx-{Node pool name}
format. Example:ack-nginx-edge-hangzhou
.Set
controllerValue
in the"k8s.io/ack-ingress-nginx-{Node pool name}"
format. Example:"k8s.io/ack-ingress-nginx-edge-hangzhou"
.
Set the parameters based on the following description when you deploy ack-ingress-nginx-v1 in an edge node pool:
Add the following label to the
service. nodeSelector
parameter:alibabacloud.com/nodepool-id: {Node pool ID}
.NoteYou need to specify only
alibabacloud.com/nodepool-id: {Node pool ID}
in theservice. nodeSelector
parameter.Set the
global. edgeNodePool
parameter totrue
. ack-ingress-nginx-v1 automatically performs the following operations:Change the type of the Service that is associated with the NGINX Ingress controller deployed in the edge node pool from LoadBalancer to NodePort. If your applications that are deployed at the edge require Internet access, you must configure a load balancer that has a public IP address.
Specify a public image address for the NGINX Ingress controller. This prevents deployment failures when the system fails to pull private images that are hosted on Alibaba Cloud.
Set the
name
andcontrollerValue
fields in theingressClassResource
parameter.NoteIf you want to deploy ack-ingress-nginx-v1 in an ACK Edge cluster multiple times, you must specify unique values for the
name
andcontrollerValue
fields each time you deploy ack-ingress-nginx-v1. Set the fields based on the following description:Set
name
in theack-nginx-{Node pool name}
format. Example:ack-nginx-edge-hangzhou
.Set
controllerValue
in the"k8s.io/ack-ingress-nginx-{Node pool name}"
format. Example:"k8s.io/ack-ingress-nginx-edge-hangzhou"
.
Click OK.
In the left-side navigation pane of the cluster details page, choose .
On the Helm page, you can find that the NGINX Ingress controller is deployed.