NGINX Ingress is a network traffic management solution for Kubernetes clusters that routes external traffic to in-cluster Services using Ingress API objects. The NGINX Ingress controller component is deployed inside the cluster and provides high performance and customization.ACK Edge cluster integrates the community version with Alibaba Cloud product features to provide a streamlined user experience. This topic describes how to use NGINX Ingress in an ACK Edge cluster.
The open source Ingress-NGINX project will no longer be maintained after March 2026. Consequently, Container Service for Kubernetes will discontinue maintenance for the NGINX Ingress controller component. Be aware of the risks. For more information, see [Product Announcement] Announcement on discontinuation of maintenance for the NGINX Ingress controller component.
Steps
-
Deploy the NGINX Ingress controller in the cloud node pool and the edge node pool. For more information, see Deploy the NGINX Ingress controller. After deployment, check the status of the NGINX Ingress controller and its Service exposure.
-
Run the following command to check the status of the NGINX Ingress controller pods in the cloud node pool:
kubectl get po -n ingress-cloud -o wideExpected output:
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES ack-ingress-nginx-v1-cloud-controller-7d7b555f8b-5kgqb 1/1 Running 0 20s 10.10.0.1 cloud-node-1 <none> <none> ack-ingress-nginx-v1-cloud-controller-7d7b555f8b-725cl 1/1 Running 0 20s 10.10.0.2 cloud-node-2 <none> <none> -
Run the following command to check the status of the NGINX Ingress controller Service in the cloud node pool:
kubectl get svc -n ingress-cloudExpected output:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ack-ingress-nginx-v1-cloud-controller LoadBalancer 172.12.0.1 xxx.xxx.xxx.xxx 80:30080/TCP,443:30443/TCP 30S -
Run the following command to check the status of the NGINX Ingress controller pods in the edge node pool:
kubectl get po -n ingress-edge -o wideExpected output:
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES ack-ingress-nginx-v1-edge-controller-7d57b84c88-4wsm4 1/1 Running 0 17s 10.10.0.1 edge-node-1 <none> <none> ack-ingress-nginx-v1-edge-controller-7d57b84c88-fqvj8 1/1 Running 0 17s 10.10.1.1 edge-node-2 <none> <none> -
Run the following command to check the status of the NGINX Ingress controller Service in the edge node pool:
kubectl get svc -n ingress-edgeExpected output:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ack-ingress-nginx-v1-edge-controller NodePort 172.12.0.2 <none> 80:32080/TCP,443:32443/TCP 3m51s
-
-
Create a file named
cube.yamlwith the following content.apiVersion: v1 kind: Service metadata: name: cube-svc annotations: openyurt.io/topologyKeys: openyurt.io/nodepool spec: type: ClusterIP selector: app: cube ports: - port: 80 targetPort: 80 --- apiVersion: apps/v1 kind: Deployment metadata: name: cube labels: app: cube spec: replicas: 4 selector: matchLabels: app: cube template: metadata: labels: app: cube spec: containers: - name: cube-web image: registry.cn-hangzhou.aliyuncs.com/acr-toolkit/ack-cube:1.0 ports: - containerPort: 80 -
Run the following command to create the
cubetest application and its Service.kubectl apply -f cube.yamlRun the following command to verify that the pods are deployed to both the cloud node pool and the edge node pool.
kubectl get pod -o wideExpected output:
NAME READY STATUS RESTARTS AGE IP NODE cube-757558c974-9zfkn 1/1 Running 0 11m 10.10.0.1 cloud-node-1 cube-757558c974-cw72m 1/1 Running 0 11m 10.10.0.2 cloud-node-2 cube-757558c974-fbvlf 1/1 Running 0 11m 10.10.1.1 edge-node-1 cube-757558c974-ngwxt 1/1 Running 0 11m 10.10.1.2 edge-node-2 -
Create a file named
ingress.yamlwith the following content to create Ingresses for the cloud and edge Ingress controllers.apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: cube-ingress-cloud namespace: default spec: ingressClassName: ack-nginx-cloud # Create an Ingress for the cloud Ingress controller. rules: - host: example.cube.com http: paths: - path: / backend: service: name: cube-svc port: number: 80 pathType: ImplementationSpecific --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: cube-ingress-edge namespace: default spec: ingressClassName: ack-nginx-edge # Create an Ingress for the edge Ingress controller. rules: - host: example.cube.com http: paths: - path: / backend: service: name: cube-svc port: number: 80 pathType: ImplementationSpecificRun the following command to create the Ingress resources.
kubectl apply -f ingress.yaml -
Run the following command to view the Ingress resources.
kubectl get ingressExpected output:
NAME CLASS HOSTS ADDRESS PORTS AGE cube-ingress-cloud ack-nginx-cloud example.cube.com 139.224.xxx.xxx 80 24m cube-ingress-edge ack-nginx-edge example.cube.com 172.20.xxx.xxx 80 24m-
A
LoadBalancertype Service exposes the NGINX Ingress controller in the cloud node pool. The system automatically populates the ADDRESS field of the Ingress with the load balancer address. Use this load balancer address to access the Service. -
A
NodePorttype Service exposes the NGINX Ingress controller in the edge node pool. The system populates the ADDRESS field of the Ingress with the ClusterIP address of the Service. You can access the Service using a node's IP address and the NodePort.
-
Related documents
ACK Edge cluster extends the capabilities of an ACK managed Pro cluster by adding an edge node pool to connect edge nodes and IDC machines. Therefore, when you use NGINX Ingress in an ACK Edge cluster, it also supports the following capabilities:
|
Actions |
Documentation |
ACK Edge differences |
|
How to create an NGINX Ingress |
You must configure the traffic topology based on your scenario. |
|
|
How to deploy the NGINX Ingress controller component |
You can deploy this component only from the Marketplace. |
|
|
How to upgrade the NGINX Ingress controller component |
You can upgrade this component only from the Marketplace. |
|
|
How to deploy the NGINX Ingress controller to support high-load applications |
Configure an NGINX Ingress controller for high-load scenarios |
None. |
|
How to configure the public and private network types for an Ingress controller CLB |
This feature is available only for Ingress controllers in a cloud node pool. |
|
|
How to implement canary releases and blue-green deployments using NGINX Ingress |
Implement canary releases and blue-green deployments using NGINX Ingress |
None. |
|
How to mirror application traffic using an Ingress controller |
None. |
|
|
How to enable tracing for the NGINX Ingress controller component |
None. |
|
|
How to deploy and view NGINX Ingress access logs |
This feature can be enabled only from the command line. |
|
|
How to access gRPC Services using an Ingress controller |
None. |