ALB Ingress operations guide
In addition to Container Service for Kubernetes (ACK) and ACK Serverless, ALB Ingress works with Enterprise Distributed Application Service (EDAS), Serverless App Engine (SAE), and self-managed Kubernetes clusters to support diverse business requirements. This topic describes the basic and advanced features of ALB Ingress and shows how to use it with other Alibaba Cloud services.
Basic features
An AlbConfig is a Custom Resource Definition (CRD) provided by the ALB Ingress controller for configuring Application Load Balancer (ALB) instances and listeners. The following table describes how to install and uninstall the ALB Ingress controller, create and modify AlbConfigs, and enable Simple Log Service in ACK and ACK Serverless clusters.
|
Object |
Feature |
Description |
ACK documentation |
ACK Serverless documentation |
|
ALB Ingress controller |
Manage the ALB Ingress controller component |
ACK provides a managed ALB Ingress controller based on ALB. You can install the ALB Ingress controller when you create a cluster or on the Add-ons page. |
||
|
Instance management |
Create an AlbConfig |
An AlbConfig is a Custom Resource Definition (CRD) provided by the ALB Ingress controller that you use to configure an ALB instance and its listeners. Each AlbConfig corresponds to one ALB instance, so you must create multiple AlbConfigs to use multiple ALB instances. |
||
|
Associate an Ingress |
An AlbConfig is associated with an Ingress by using a standard Kubernetes IngressClass resource. You must first create an IngressClass and then associate it with the AlbConfig. |
Use an IngressClass to associate an AlbConfig with an Ingress |
||
|
Modify an AlbConfig |
You can modify AlbConfig properties, such as the name and vSwitch settings. Changes take effect immediately after you save them. |
|||
|
Enable access logging with Simple Log Service |
If you want ALB Ingress to collect access logs, you must specify Note
|
|||
|
Reuse an existing ALB instance |
To reuse an existing ALB instance, specify its ID when creating the AlbConfig. |
|||
|
Use multiple ALB instances |
When you need to use multiple ALB instances, you can specify different IngressClasses in the Ingress by using |
|||
|
Delete an ALB instance |
Each ALB instance corresponds to one AlbConfig. To delete an ALB instance, delete its associated AlbConfig. Before deleting an AlbConfig, you must first delete all Ingresses associated with it. |
|||
|
Listener management |
Specify an HTTPS certificate |
You can specify an Application Load Balancer (ALB) certificate by using an ALBConfig and configuring its |
Configure an HTTPS certificate to enable encrypted communication |
Configure an HTTPS certificate to enable encrypted communication |
|
Support for TLS security policies |
When configuring an HTTPS listener in an AlbConfig, you can specify a custom or system default TLS security policy. For more information, see TLS security policies. |
Advanced features
In an ACK cluster, ALB Ingress manages external access to cluster Services, providing Layer 7 load balancing capabilities. The following table describes how to use an ALB Ingress to forward requests from different domain names or URL paths to different backend server groups, redirect HTTP requests to HTTPS, and implement canary releases.
|
Feature |
Description |
ACK documentation |
ACK Serverless documentation |
|
Forward requests based on domain names |
Create a simple Ingress to forward requests based on a specified domain name or an empty domain name. |
||
|
Forward requests based on URL paths |
ALB Ingress supports request forwarding based on URL paths. You can specify a URL matching policy in the |
||
|
Custom forwarding rules |
ALB Ingress supports custom forwarding rules composed of match conditions and actions. With ALB Ingress, you can:
Important
|
||
|
Configure health checks |
You can use an annotation to configure health checks and ensure service availability. |
||
|
Configure automatic certificate discovery |
You must first create a certificate in the Certificate Management Service console. The ALB Ingress controller then automatically discovers and matches the certificate to the domain name specified in the Ingress's TLS configuration. |
Configure an HTTPS certificate to enable encrypted communication |
Configure an HTTPS certificate to enable encrypted communication |
|
Redirect HTTP to HTTPS |
To redirect HTTP requests to HTTPS port 443 with an ALB Ingress, use the following annotation. |
||
|
Support for HTTPS and gRPC protocols |
ALB supports HTTPS and gRPC as backend protocols. You can configure them for an ALB Ingress by setting the annotation to Note
The backend protocol cannot be modified. If you need to change the protocol, delete and recreate the Ingress. |
||
|
Support for rewrite |
You can configure rewrites by setting the Note
|
||
|
Configure custom listener ports |
ALB Ingress supports custom listener ports. This allows you to expose services on both port 80 and port 443 at the same time. |
||
|
Configure forwarding rule priority |
You can use an annotation to define the priority of forwarding rules for an ALB Ingress. Note
Rule priorities must be unique within the same listener. The |
||
|
Implement a canary release by using annotations |
ALB Ingress provides complex routing capabilities and supports canary releases based on Header, Cookie, and weight. You can use annotations to implement canary releases. To enable this feature, set the |
||
|
Implement session persistence by using annotations |
ALB Ingress supports session persistence through the |
||
|
Specify a load balancing algorithm for a server group |
ALB Ingress supports specifying the server group load balancing algorithm by setting the Ingress annotation |
||
|
Configure cross-origin resource sharing (CORS) |
You can configure cross-origin resource sharing (CORS) by using annotations. |
||
|
Backend persistent connections |
ALB supports backend keep-alive connections to reduce resource consumption at the connection layer and improve processing performance. In ALB Ingress, you can enable this feature by using the annotation |
||
|
Support for QPS throttling |
ALB supports QPS throttling for forwarding rules. The QPS throttling value can range from 1 to 100,000. For ALB Ingress, you only need to set the |
||
|
Slow start |
ALB Ingress supports enabling slow start by using the Note
The longer the duration, the slower the traffic increases. |
||
|
Connection draining |
ALB Ingress supports connection draining. You can enable connection draining by using the |
||
|
Mount Kubernetes pods and ECS instances as backend servers |
ALB Ingress supports configuring backend server groups by using the |
Use ALB Ingress to implement hybrid mounting, cross-region mounting, and on-premises IDC mounting |
Use ALB Ingress to implement hybrid mounting, cross-region mounting, and on-premises IDC mounting |
|
Mount cross-region and on-premises IDC resources by using a combination of products, such as Cloud Enterprise Network and Transit Router |
By using ALB with products like Cloud Enterprise Network (CEN) and Transit Router, you can forward requests to servers in other regions' VPCs or to on-premises data centers. |
JSON values in Ingress annotations must use standard English punctuation. Mixing Chinese and English punctuation causes an
invalid characterreconciliation error. Edit these values using an English input method.
ALB Ingress integrations
Alibaba Cloud integrations
|
Alibaba Cloud product |
Feature |
Description |
Documentation |
|
WAF |
Enable WAF protection for ALB Ingress |
Web Application Firewall (WAF) protects your applications from common web attacks. When WAF protection is enabled for an ALB Ingress, all traffic to the ALB instance is protected. |
|
|
EDAS |
Create an application route (ALB Ingress) |
Enterprise Distributed Application Service (EDAS) uses ALB Ingress for application routing. Based on Alibaba Cloud Application Load Balancer (ALB), ALB Ingress provides advanced traffic management, is compatible with Nginx Ingress, and handles complex business routing and automatic certificate discovery. |
|
|
SAE |
Implement end-to-end canary releases based on Ingress gateways |
You can use an ALB Ingress gateway to implement end-to-end traffic control for your SAE applications without modifying any business code. |
|
|
ASM |
Integrate with ALB by using an Ingress. |
You can integrate Alibaba Cloud Service Mesh (ASM) with Application Load Balancer (ALB) by using an Ingress. This allows ALB users to leverage ASM's capabilities. |
|
|
HPA |
Integrate with ALB by using an Ingress. |
You can integrate Horizontal Pod Autoscaler (HPA) with Application Load Balancer (ALB) by using an Ingress to enable automatic, QPS-based application autoscaling. |
Use HPA to implement application autoscaling based on QPS data |
|
Knative |
Access services through ALB in ACK or ACK Serverless clusters where the Knative component is installed. |
Knative is a Kubernetes-based serverless framework. You can use Knative to configure ALB service discovery and implement canary releases based on headers and cookies. |
|
|
ACK One |
Create a multi-cluster ALB gateway by using an Ingress. |
Distributed Cloud Container Platform for Kubernetes (ACK One) is an enterprise-level cloud-native platform from Alibaba Cloud for scenarios such as hybrid clouds, multi-cluster management, distributed computing, and disaster recovery. The ACK One ALB multi-cluster gateway, which is the multi-cluster mode of ALB Ingress, allows you to implement active-active zone-disaster recovery, geo-disaster recovery, multi-cluster load balancing, and header-based routing to specific clusters. |
Open source integrations
|
Open source product |
Feature |
Description |
Documentation |
|
Self-managed Kubernetes on the cloud |
Use ALB in a self-managed Kubernetes cluster by using an Ingress. |
In a Kubernetes cluster built on Elastic Compute Service (ECS) resources, you can use an Ingress to orchestrate ALB routing for automatic service discovery and in-cluster load balancing. |
User guide for ALB Ingress on self-managed Kubernetes clusters |