Skip to content

Commit c0f5e12

Browse files
Staging net-new content for Jerry's review
1 parent 305b808 commit c0f5e12

2 files changed

Lines changed: 28 additions & 30 deletions

File tree

support/azure/azure-kubernetes/load-bal-ingress-c/tshoot-performance-ingress.md renamed to support/azure/azure-kubernetes/load-bal-ingress-c/troubleshoot-performance-ingress.md

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,28 @@ ms.reviewer: claudiogodoy
55
ms.service: azure-kubernetes-service
66
ms.date: 05/24/2025
77
---
8-
# Managed NGINX Ingress Controller Troubleshoot
8+
# Managed NGINX ingress controller guidance
99

10-
The [Managed NGINX ingress controller](/azure/aks/app-routing) is a routing add-on that enables routing Hypertext Transfer Protocol (HTTP) and secure (HTTPS) traffic to applications running on an [Azure Kubernetes Service (AKS)](https://learn.microsoft.com/en-us/azure/aks/) cluster.
10+
The [Managed NGINX ingress controller](/azure/aks/app-routing) is a routing add-on that enables routing HTTP and HTTPS traffic to applications running on an [Azure Kubernetes Service (AKS)](/azure/aks/) cluster.
1111

1212
In performance-related problems, the routing system may be the root cause. This article provides step-by-step guidance to troubleshoot NGINX ingress controller performance issues.
1313

1414
## Prerequisites
1515

16-
Before you start, ensure you have the following tools installed:
16+
Before you start, ensure you have the following tool installed:
1717

18-
- **Kubernetes CLI (`kubectl`)**: Use Azure CLI to install it by running the command `az aks install-cli`.
18+
- **Kubernetes CLI (`kubectl`)**: Use Azure CLI and run the command `az aks install-cli`.
1919

20-
## Common Symptoms
20+
## Symptoms
2121

2222
| Symptom | Description |
2323
| --- | --- |
24-
| **HTTP Gateway Errors** | Error codes such as 502, 504 might indicate an NGINX exhaustion problem. |
25-
| **High Response Time Difference** | Significant difference between your service response time and the end-to-end response time. There's a common latency added by NGINX, but when it's too large, you might have an NGINX exhaustion problem. |
24+
| **HTTP Gateway Errors** | Error codes like `502` and `504` can indicate an NGINX exhaustion problem. |
25+
| **High Response Time Difference** | Significant difference between your service response time and the end-to-end response time. There's a common latency added by NGINX. When it's too large, you might have an NGINX exhaustion problem. |
2626

27-
## Step 1: Verify HPA Behavior
27+
## Step 1: Verify horizontal pod autoscaler (HPA) behavior
2828

29-
The most common reason for performance issues on the NGINX is CPU exhaustion. During a load spike in the system, a good approach is to watch the [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/) behavior.
29+
The most common reason for performance issues on the NGINX is CPU exhaustion. During a load spike in the system, a good approach is to monitor [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/) behavior.
3030
By default, the routing add-on creates a [namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) named `app-routing-system`.
3131

3232
1. **Get the HPA name**:
@@ -35,13 +35,13 @@ By default, the routing add-on creates a [namespace](https://kubernetes.io/docs/
3535
kubectl get hpa -n app-routing-system
3636
```
3737

38-
2. **Watch the HPA behavior**:
38+
2. **Monitor the HPA behavior**:
3939

4040
```console
4141
kubectl get hpa <HPA_NAME> -n app-routing-system -w
4242
```
4343

44-
3. **Evaluate the result**:
44+
3. **Evaluate the results**:
4545

4646
```console
4747
$ kubectl get hpa <HPA_NAME> -n app-routing-system -w
@@ -52,35 +52,35 @@ By default, the routing add-on creates a [namespace](https://kubernetes.io/docs/
5252
nginx Deployment/nginx cpu: 133%/70% 1 2 2 80m
5353
```
5454

55-
The **TARGETS** column shows the CPU threshold where the `HPA` will trigger to scale up the pods. You must interpret this behavior. There are a few possibilities:
55+
The **TARGETS** column shows the CPU threshold where the `HPA` triggers to scale up the pods. There are a few possibilities for this behavior:
5656

57-
- The `HPA` has reached the maximum number of pods.
57+
- `HPA` has reached the maximum number of pods.
5858
- There are no available nodes to schedule the pods.
5959

60-
## Step 2: Look for Pods in Pending State
60+
## Step 2: Look for pods in pending state
6161

62-
If in the previous step you saw that the `NGINX HPA` hasn't reached the maximum number of pods, the [kube-scheduler](https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/#kube-scheduler) might be struggling to find available nodes to schedule the `NGINX pods`.
62+
If in your evaluation you saw that `NGINX HPA` hadn't reached the maximum number of pods, the [kube-scheduler](https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/#kube-scheduler) might not be able to find available nodes to schedule the `NGINX pods`.
6363

64-
1. **Get Pending Pods**:
64+
1. **Get pending pods**:
6565

6666
```console
6767
kubectl get pod --field-selector=status.phase=Pending -n app-routing-system
6868
```
6969

7070
> [!NOTE]
71-
> If there are Pending pods, the cluster is probably facing a resource exhaustion problem. In this case, refer to [Troubleshoot pod scheduler errors in Azure Kubernetes Service](azure/azure-kubernetes/availability-performance/troubleshoot-pod-scheduler-errors).
71+
> If there are pending pods, the cluster is probably facing a resource exhaustion problem. See [Troubleshoot pod scheduler errors in Azure Kubernetes Service](azure/azure-kubernetes/availability-performance/troubleshoot-pod-scheduler-errors) for more details.
7272

73-
## Step 3: Verify if There Are Limits Applied to the NGINX Deployment
73+
## Step 3: Verify if there are Limits applied to the NGINX deployment
7474

75-
Any misconfiguration on the `NGINX` [resource limits or requests](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) might lead to `HPA` scaling up more pods than necessary.
75+
Any misconfiguration on the `NGINX` [resource limits or requests](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) can lead to `HPA` scaling up more pods than necessary.
7676

77-
1. **Describe the NGINX Deployment**:
77+
1. **Describe the NGINX deployment**:
7878

7979
```console
8080
kubectl describe deploy nginx -n app-routing-system
8181
```
8282

83-
2. **Verify Requests and Limits**:
83+
2. **Verify requests and limits**:
8484

8585
```console
8686
$ kubectl describe deploy nginx -n app-routing-system
@@ -101,11 +101,11 @@ Any misconfiguration on the `NGINX` [resource limits or requests](https://kubern
101101

102102
## Solution
103103

104-
By default, the current version of the NGINX ingress controller does not set limits for NGINX pods and requests `500m` CPU, which is used by the `HPA`. It is not recommended to change these values directly in the deployment definition.
104+
By default, the current version of the NGINX ingress controller doesn't set limits for NGINX pods and requests `500m` CPU, which is used by the `HPA`. It's not recommended to change these values directly in the deployment definition.
105105

106-
If your `HPA` is reaching the maximum number of pods and the deployment's requests and limits remain unchanged, you should configure the [custom resource definition (CRD)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) called [NginxIngressController](https://github.com/Azure/aks-app-routing-operator/blob/main/config/crd/bases/approuting.kubernetes.azure.com_nginxingresscontrollers.yaml).
106+
If your `HPA` is reaching the maximum number of pods and the deployment's requests and limits remain unchanged, configure the [custom resource definition (CRD)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) named [NginxIngressController](https://github.com/Azure/aks-app-routing-operator/blob/main/config/crd/bases/approuting.kubernetes.azure.com_nginxingresscontrollers.yaml).
107107

108-
### Configuration Options
108+
### Configuration options
109109

110110
The following configuration options directly impact the `HPA` behavior:
111111

@@ -114,11 +114,9 @@ The following configuration options directly impact the `HPA` behavior:
114114
| `scaling` | object | Configuration for scaling the controller. Contains nested properties. | No | - |
115115
| `maxReplicas` | integer | Upper limit for replicas. | No | 100 |
116116
| `minReplicas` | integer | Lower limit for replicas. | No | 2 |
117-
| `threshold` | string | Scaling threshold defining how aggressively to scale. Options: `rapid`, `steady`, `balanced`. | No | balanced |
117+
| `threshold` | string | Scaling threshold defining how aggressively to scale. Options include: `rapid`, `steady`, `balanced`. | No | balanced |
118118

119-
### How to Apply the Configuration
120-
121-
Follow these steps to apply the configuration:
119+
### Apply the configuration
122120

123121
1. **Edit the NginxIngressController CRD**:
124122

@@ -144,7 +142,7 @@ Follow these steps to apply the configuration:
144142
kubectl get hpa -n app-routing-system
145143
```
146144

147-
The HPA will automatically update based on your new configuration, and the NGINX ingress controller will scale according to the specified parameters.
145+
The HPA automatically updates based on your new configuration and the NGINX ingress controller scales according to the specified parameters.
148146

149147
## Additional resources
150148

support/azure/azure-kubernetes/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
- name: Troubleshoot Application Gateway Ingress Controller connectivity
154154
href: load-bal-ingress-c/troubleshoot-app-gateway-ingress-controller-connectivity-issues.md
155155
- name: Troubleshoot Performance Issues with the Managed NGINX Ingress Controller in AKS
156-
href: load-bal-ingress-c/tshoot-performance-ingress.md
156+
href: load-bal-ingress-c/troubleshoot-performance-ingress.md
157157

158158
- name: Troubleshoot Kubernetes control plane
159159
items:

0 commit comments

Comments
 (0)