ALB Ingress FAQ
This page answers common questions about Application Load Balancer (ALB) Ingresses in Container Service for Kubernetes (ACK).
Why is an ALB instance rolled back from the WAF-enabled edition to the Standard edition?
If you enable WAF protection for an ALB instance in the WAF console, the ALB Ingress Controller detects this in subsequent reconciliations. The actual edition of the instance no longer matches the edition field declared in the AlbConfig. If the AlbConfig does not explicitly specify edition: StandardWithWaf, the controller restores the instance to the default Standard edition. The WAF-enabled edition is therefore rolled back.
To keep the ALB instance on the WAF-enabled edition, specify the edition field in the AlbConfig and set it to StandardWithWaf. Do this when you create a new ALB instance or modify an existing one.
Why do requests to my Ingress domain name return HTTP status codes such as 503, 502, or 404?
Possible causes
-
503 (Service Temporarily Unavailable) error
-
No matching routing rule: The request path does not match any routing rules configured in the Ingress.
-
No healthy backend pods: The associated Service has no ready pods, which results in an empty endpoints object.
-
-
502 (Bad Gateway) error
After an HTTP or HTTPS listener receives a client connection request, the ALB sends an HTTP 502 Bad Gateway status code to the client because it fails to forward the request to a Pod or receive a response from the Pod.
-
404 (Not Found) error
This typically occurs when a request matches an Ingress routing rule, but its URL does not match the service path of the application in the backend pod.
-
400 (Bad Request) error
This can occur for several reasons, such as sending an HTTP request to an HTTPS listener.
For more information about HTTP error codes, see ALB status codes.
Solution
-
Check the Ingress status: Run the
kubectl describe ingress <ingress-name> -n <namespace>command and inspect the Events section for error messages. If an event likelistener is not exist in albappears, add the required listener configuration to your AlbConfig.... Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning FailedBuildModel **** ingress listener is not exist in alb, port: 443, protocol: HTTPS Warning FailedBuildModel **** ingress listener not found for (443/HTTPS), with ingresses 1 ... -
Check the backend endpoints: Run the
kubectl get endpoints <service-name> -n <namespace>command to confirm that theENDPOINTSfield lists at least one healthy pod IP address and port. If it is empty, verify that theselectorof the Service matches thelabelsof the pods, and that the pods are in theRunningstate. -
Check the pod status and logs: Run
kubectl get pod -l <app=your-app> -n <namespace>to view the pod status. Then, use the pod name to runkubectl logs <pod-name> -n <namespace>and check the application logs for startup failures or request processing errors. -
Test network connectivity: From within a pod or from a node, use
curlto access the backend Service's ClusterIP or a pod IP to verify that the service is reachable within the cluster.
Why is HTTPS still inaccessible after I configure TLS for an Ingress?
Possible causes
-
The ALB instance is not listening on port 443: You have configured TLS for the Ingress, but the corresponding
HTTPS:443listener has not been created. -
Incorrect certificate configuration: The Secret type is not
kubernetes.io/tlsorIngressTLS, or the content oftls.crtandtls.keyin thedatafield is incorrect or does not match. -
Stale certificate: The ALB instance may be using an old certificate. This happens if you update a certificate in Alibaba Cloud Certificate Management Service but do not update the certificate ID in your AlbConfig, or if automatic discovery and reconciliation fails to trigger.
Solution
-
Check the listener port: Run the
kubectl describe albconfig <alb-name> -n <namespace>command to verify that thespec.listeners.port: 443andspec.listeners.protocol: HTTPSconfigurations are present. -
Check the Ingress configuration: Verify that the Ingress configuration includes the
alb.ingress.kubernetes.io/listen-ports: [{"HTTP": 80}, {"HTTPS": 443}]annotation. This annotation associates the Ingress with HTTP and HTTPS listeners. -
Check the Secret configuration: In the Ingress configuration, check the
secretNamefield ofspec.tlsto confirm that the correct Secret is referenced. Run thekubectl get secret <secret-name> -n <namespace> -o yamlcommand to confirm the Secret type and data integrity.
Why do ALB Ingress rules fail to take effect?
After you create an ALB Ingress rule, the routing rule may not take effect as expected, and requests cannot be forwarded to the corresponding backend service.
The ALB instance maintains routing rules in serial order. When multiple Ingresses share the same ALB instance, a configuration error in any one of them prevents all other Ingresses on that instance from taking effect.
When rules stop working, check all Ingresses on the instance—not just the one you most recently created.
To fix this, find the Ingress with the error—typically one created before the affected Ingresses—and correct its configuration. The other Ingresses will resume working once the error is resolved.
What is the difference between ALB Ingresses and Nginx Ingresses?
Prefer ALB Ingresses over Nginx Ingresses for Ingress traffic management. ALB Ingresses are built on ALB, a fully managed cloud service that requires no manual maintenance and provides more powerful Ingress traffic management and higher-performance gateway services. Nginx Ingresses require you to manage the controller yourself.
For a detailed comparison, see Comparison among Nginx Ingresses, ALB Ingresses, and MSE Ingresses.
How do I mount IP-type servers?
To mount backend pods to ALB as IP-type servers, the Service must create an IP-type server group. The Service cannot do so under the default configuration, which limits traffic distribution to the backend service.
Add the alb.ingress.kubernetes.io/server-group-type: Ip annotation to the Service annotations. This creates an IP-type server group for the Service, so backend pods can be registered with ALB as IP-type servers.
-
The server group type cannot be changed after the group is created. In Flannel network mode, switching the Service type (for example, between ClusterIP and NodePort) changes how the backends are mounted between IP and ECS node types. They therefore cannot join the existing server group. Do not change the Service type of an existing Service.
-
To change the server group type, create a new Service and specify
alb.ingress.kubernetes.io/server-group-type: Ipin its annotations, so that the existing server group and its backends are not affected. -
If the Service that an Ingress points to has not been created, ALB Ingress Controller cannot read the Service annotations. The controller then creates the server group in advance as an instance-type group, so IP-type backends fail to be mounted. Create the Service before the Ingress.
-
After you add the
alb.ingress.kubernetes.io/server-group-type: Ipannotation, do not delete it. Otherwise, the server group type of the Service becomes inconsistent, reconciliation fails, and backend nodes cannot join the server group.
apiVersion: v1
kind: Service
metadata:
annotations:
alb.ingress.kubernetes.io/server-group-type: Ip
name: tea-svc
spec:
ports:
- port: 80
targetPort: 80
protocol: TCP
selector:
app: tea
type: ClusterIP
What is the kube-system-fake-svc-80 server group?
ALB requires a default forwarding rule before a listener can be created, and each forwarding rule can forward traffic only to a server group. The kube-system-fake-svc-80 server group fulfills this requirement—it is a placeholder used by the default forwarding rule. It does not process any requests and cannot be deleted.
How do I configure DNS resolution for an Ingress?
-
Register a domain name and complete the ICP filing.
-
For example, add a DNS record with the record type
CNAME, the host record@(which represents the root domain, such asingress-demo.com), and the record value as the Ingress endpoint address. -
In a browser, go to http://ingress-demo.com/coffee to verify that the domain name resolution is working.
After access is successful, an NGINX test page is returned, displaying information such as the Server address, Server name, Date, and URI (with the value
/coffee) of the backend pod. This indicates that the Ingress has correctly routed the request to the backend pod.For verification, replace the example with your registered domain name. If the domain name resolution fails, see Quick troubleshooting for domain name resolution failures.
Can I enable both internal and external access for an ALB Ingress?
In real business scenarios, you may need to access an ALB Ingress over both the internet and an internal network.
Yes. Create an Internet-facing ALB instance. The instance automatically provisions a public elastic IP address (EIP) in each availability zone for internet traffic. The instance is also assigned a private virtual IP address (VIP) for internal network access—so both access modes work simultaneously.
If you only need internal access, create an internal-facing ALB instance instead.
Why can't I see the ALB Ingress Controller pod in my cluster?
When you look for the ALB Ingress Controller pod in a cluster, the kube-system namespace may contain no related pod. You then cannot view the component in the usual way.
The ALB Ingress Controller pod is visible in the kube-system namespace only in ACK dedicated clusters. In ACK Basic, ACK Pro, and ACK Serverless clusters, the ALB Ingress Controller runs as a fully managed component and is not exposed as a pod in your cluster.
If you want to migrate from an ACK dedicated cluster, see Hot migration from ACK dedicated clusters to ACK Pro clusters.
How do I keep the ALB domain name from changing?
The domain name stays stable as long as you don't modify the IngressClass or the AlbConfig object it references. When you use an AlbConfig object to create an ALB instance, the Ingress references that instance through an IngressClass. The domain name is tied to the ALB instance, not to the Ingress itself.
Is an ALB instance automatically created when I enable ALB Ingress during cluster creation?
It depends on the ALB instance option that you select when you enable ALB Ingress. If you select New, ACK automatically creates a standard, pay-as-you-go ALB instance, an AlbConfig, and an IngressClass. If you select Existing, ACK uses the ALB instance that you specify, and automatically creates an AlbConfig and an IngressClass. If you select None, ACK installs only the ALB Ingress Controller component, and you must manually create an AlbConfig and an IngressClass. For more information, see Expose services with an ALB Ingress.
How do I configure HTTPS encryption for an Ingress?
-
Purchase an official certificate or a personal test certificate, and apply for a certificate. Make sure that the certificate you want to use is in the Issued state.
-
This example shows how to download the PEM-formatted certificate file for the
ingress-demo.comdomain, with the server type set to Other. -
Create a Secret to store the certificate file.
-
On the Clusters page, click the name of your cluster. In the left navigation pane, click .
-
On the Secrets page, select the
defaultnamespace and then click Create on the left. Add the following configurations and click OK.-
Name:
ingress-tls -
Type: Ingress TLS Certificate
-
Certificates: The full content of the downloaded and unzipped certificate file (.pem).
-
Key: The full content of the downloaded and unzipped private key file (.key).
-
-
-
Update the AlbConfig to add an
HTTPS:443listener for the ALB instance.-
In the left-side navigation pane, choose . On the Resource Objects tab, search for AlbConfig, and then click the search result.
-
In the list of AlbConfig resource objects, find the target resource
alband click Edit YAML in the Actions column. -
Add the
spec.listeners.port: 443andspec.listeners.protocol: HTTPSfields, and then click OK.spec: config: addressAllocatedMode: Fixed addressType: Internet zoneMappings: - vSwitchId: vsw-xxx - vSwitchId: vsw-xxx listeners: - port: 80 protocol: HTTP - port: 443 protocol: HTTPS
-
-
Update the Ingress to add a TLS configuration and associate it with the
HTTPS:443listener.-
In the left-side navigation pane, choose . In the Actions column of the target Ingress, click Update.
-
Add the following configurations and click OK.
-
TLS Settings: Enabled
-
Domain Name:
ingress-demo.com -
Secrets:
ingress-tls -
Annotations:
alb.ingress.kubernetes.io/listen-ports: [{"HTTP": 80}, {"HTTPS": 443}]
-
-
-
In a browser, go to
https://ingress-demo.com/coffeeto verify HTTPS access.The page displays the NGINX logo and server response information. The Server address, Server name, and URI (with the value
/coffee) are returned as expected. This confirms that HTTPS is configured correctly and that the Ingress routes requests to the coffee backend pod.For verification, replace the example with your registered domain name.
For more information about how to configure HTTPS certificates, see Configure HTTPS certificates for encrypted communication.
Does ALB Ingress support cross-namespace Service selection?
No. ALB Ingress does not support cross-namespace Service selection. If the referenced Service resides in a different namespace, the Ingress cannot correctly associate the backend service.
Does ALB Ingress QPS rate limiting have a separate charge? What is its scope? How do I configure different rate limits for different paths?
Billing: Rate limiting by queries per second (QPS) is not separately charged. However, the ALB instance is billed based on usage. For details, see ALB billing.
Applicable scope: The alb.ingress.kubernetes.io/traffic-limit-qps annotation applies at the Ingress level. When this annotation is configured, the controller applies the same rate limiting configuration to each ALB forwarding rule generated for the Ingress. This configuration cannot be set independently for a single path, nor is the QPS quota shared among multiple paths.
Different rate limiting configurations: If different paths require different rate limiting values, split the configuration into multiple Ingresses and configure a specific rate limiting annotation for each. A single ALB instance can be associated with multiple Ingresses, so multiple ALB instances are not required. For advanced scenarios, configure TrafficLimit using a custom forwarding rule action. However, this method cannot be used with the global traffic-limit-qps annotation.
Does ALB Ingress support multiple domain names?
Yes. A single ALB listener can bind different domain names by configuring multiple forwarding rules.
To configure multiple domain names, define multiple host entries under spec.rules in the Ingress resource.
Why are my ALB console changes overwritten, added rules deleted, and access logs switched off?
Configurations that you manually change in the ALB console may be lost or automatically deleted, and access logs may be switched off.
ALB Ingress configuration is managed through the ALB Ingress or AlbConfig object on the cluster's API server. Changes made directly in the ALB console are not synced back to the API server. Any internal call or cluster operation therefore overwrites the console changes with the configuration stored in the cluster.
Always modify the ALB Ingress or AlbConfig object in the cluster—not the configuration in the ALB console.
What do I do if a forwarding rule is deleted immediately after it is created and requests return HTTP 503?
A forwarding rule of an ALB Ingress may be deleted immediately after it is created. Requests then return the HTTP 503 status code, and traffic cannot be distributed as expected.
Check whether the ALB Ingress for the forwarding rule has the canary:true annotation. For canary releases, traffic is redirected from the old Service version to the canary version—add canary:true only to the canary Ingress, not to the old Service's Ingress.
Canary releases support only two Ingresses and require the old Service version to redirect traffic. For more flexible traffic routing, use custom forwarding rules instead. See Use ALB Ingresses to perform canary releases and Configure custom forwarding rules for ALB Ingresses.
What do I do if the AlbConfig reports the "listener is not exist in alb, port: xxx" error?
Requests to ports other than port 80 may fail to connect. The AlbConfig also reports the listener is not exist in alb, port: xxx error, so the related ports cannot receive or forward traffic.
By default, a created AlbConfig contains only a listener on port 80. To listen on other ports, add the listener configurations for those ports to the AlbConfig. For more information, see Configure ALB listeners using AlbConfig.
What do I do if the HTTP and HTTPS listener ports configured in an AlbConfig are inaccessible?
You may have configured HTTP and HTTPS listener ports in the AlbConfig, but requests to both ports fail and the service cannot be accessed over these ports.
Check whether the alb.ingress.kubernetes.io/listen-ports annotation is added to the annotations of the Ingress resource to specify that the ALB Ingress listens on both HTTP (port 80) and HTTPS (port 443). Example:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: https-ingress
annotations:
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80},{"HTTPS": 443}]' # Add this annotation when you use multiple listeners so that the ALB Ingress works as expected.
spec:
#...
Why don't my ALB Ingress changes take effect even when no abnormal events are reported?
After you change ALB Ingress configurations or associate an Ingress with an AlbConfig, no abnormal events are reported, but the changes do not take effect.
The IngressClass may be pointing to the wrong AlbConfig object. Check that the parameters field in your IngressClass is correctly configured. See Use an IngressClass to associate an AlbConfig object with an Ingress.
What do I do if the reconciliation error "Specified parameter array contains too many items, up to 15 items, Certificates is not valid" is reported?
This error is reported during reconciliation, and the ALB Ingress cannot associate the required certificates.
ALB Ingress Controller v2.11.0-aliyun.1 and later support certificate pagination. This error indicates that your component version does not support certificate pagination and that more than 15 certificates are associated in a single reconciliation. We recommend that you upgrade ALB Ingress Controller to the latest version. For version information, see ALB Ingress Controller. For information about how to upgrade the component, see Manage the ALB Ingress controller.
Why were some listeners deleted after I ran kubectl apply to update the access control list (ACL) of an AlbConfig for an ALB instance created in the console?
After you create and configure an ALB instance in the ALB console, some listeners may be unexpectedly deleted when you use kubectl apply to update the ACL of its AlbConfig. The related ports or rules then become invalid.
kubectl apply overwrites the entire AlbConfig resource. If your YAML file omits any listeners that were previously configured, those listeners are deleted.
Before running kubectl apply on an AlbConfig, run kubectl diff to preview the changes and confirm that all existing listeners are included in your YAML file. Then apply the changes to the Kubernetes cluster with kubectl apply.
Use kubectl edit when possible—it opens the full current resource for editing and avoids accidental omissions:
kubectl -n <namespace> edit albconfig <albconfig-name> # Replace <namespace> and <albconfig-name> with the namespace and the name of the AlbConfig resource.
If listeners were already deleted, first check whether your YAML file lists every listener, and if it does not, add them back using the same kubectl edit command above.
Why is the external endpoint (Endpoint) of an ALB Ingress empty, or why can its address not be obtained?
If the external endpoint of an ALB Ingress is empty or the address cannot be obtained, check the following common causes and take the corresponding action:
IngressClass not specified: Ensure the Ingress resource specifies the correct
ingressClassName(for example,alb). IfingressClassNameis not set or the value does not match the IngressClass managed by the ALB Ingress Controller, the controller will not process the Ingress and the endpoint will remain empty.Incorrect AlbConfig association: Check whether the IngressClass is associated with the correct AlbConfig name, and verify that the AlbConfig status is normal. An incorrect association or an AlbConfig in an abnormal state prevents ALB from being provisioned. For more information, see Use an IngressClass to associate an AlbConfig with an ingress.
Insufficient vSwitch IPs: Check the number of available IP addresses in the vSwitches associated with the AlbConfig. To ensure the ALB's elastic features are fully supported, reserve at least 8 IP addresses in each vSwitch where the ALB instance is deployed. If available IPs are insufficient, replace the vSwitch or expand the vSwitch CIDR range.
Insufficient availability zones: ALB requires high availability and needs vSwitches in at least two different availability zones. If only one availability zone is configured, add vSwitches in at least one other availability zone.
Component installation option: If None was selected during component installation, no ALB instance or AlbConfig was created automatically. You must manually create AlbConfig and IngressClass and associate an AlbConfig with an Ingress using IngressClass.
How do I reduce reconciliation time during pod scaling?
When the pods of a Service scale in or out, server reconciliation may take a long time and delay elastic scaling for your workloads. Reconciliation time increases with the number of Ingresses associated with a Service. Use either of these approaches:
-
Limit Ingresses per Service: Keep no more than 30 Ingresses associated with any single Service.
-
Consolidate Ingress rules: Associate multiple Services with the same Ingress and define separate forwarding rules within it, rather than creating one Ingress per Service.
How do I automatically allocate node weights in Flannel clusters when a Service is set to Local mode?
In a cluster that uses the Flannel plug-in, if a Service is configured in Local mode, traffic may be unevenly distributed and some nodes may experience high loads. You may want node weights to be automatically allocated based on the number of pods on each node.
ALB Ingress Controller supports automatic node weight allocation from v2.13.1-aliyun.1. Upgrade to the latest version to use this feature. For more information, see Manage the ALB Ingress controller.
In a Flannel cluster, when a Service is set to Local mode, node weights are calculated as shown in the following figure. In this example, the business pods (app=nginx) are deployed on three ECS instances and exposed by Service A.
|
Total number of backend pods of the Service |
Description |
|
100 or fewer pods |
ALB Ingress Controller uses the number of pods on each node as the weight of that node. For example, as shown in the preceding figure, if three ECS instances host 1, 2, and 3 pods, their weights are set to 1, 2, and 3. Traffic is then distributed to the three ECS instances at a ratio of 1:2:3 for more balanced pod loads. |
|
More than 100 pods |
ALB Ingress Controller calculates the weight of each node based on the percentage of pods on that node out of the total number of pods. For example, if the three ECS instances in the preceding figure host 100, 200, and 300 pods, their weights are set to 16, 33, and 50. Traffic is then distributed at a ratio of 16:33:50 to achieve a more balanced pod load distribution. |