Skip to content

Commit cabd22b

Browse files
authored
Merge pull request #234747 from JackStromberg/patch-112
[MERGE this PR before EOD Sunday, 7-23] Application Gateway for Containers
2 parents 3e48b53 + 4e225a9 commit cabd22b

File tree

39 files changed

+5281
-61
lines changed

39 files changed

+5281
-61
lines changed
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
---
2+
title: ALB Controller - Backend Health and Metrics
3+
description: Identify and troubleshoot issues using ALB Controller's backend health & metrics endpoints for Application Gateway for Containers.
4+
services: application-gateway
5+
author: greglin
6+
ms.service: application-gateway
7+
ms.subservice: appgw-for-containers
8+
ms.topic: article
9+
ms.date: 07/24/2023
10+
ms.author: greglin
11+
---
12+
13+
# ALB Controller - Backend Health and Metrics
14+
15+
Understanding backend health of your Kubernetes services and pods is crucial in identifying issues and assistance in troubleshooting. To help facilitate visibility into backend health, ALB Controller exposes backend health and metrics endpoints in all ALB Controller deployments.
16+
17+
ALB Controller's backend health exposes three different experiences:
18+
1. Summarized backend health by Application Gateway for Containers resource
19+
2. Summarized backend health by Kubernetes service
20+
3. Detailed backend health for a specified Kubernetes service
21+
22+
ALB Controller's metric endpoint exposes both metrics and summary of backend health. This endpoint enables exposure to Prometheus.
23+
24+
Access to these endpoints can be reached via the following URLs:
25+
- Backend Health - http://\<alb-controller-pod-ip\>:8000/backendHealth
26+
- Output is JSON format
27+
- Metrics - http://\<alb-controller-pod-ip\>:8001/metrics
28+
- Output is text format
29+
30+
Any clients or pods that have connectivity to this pod and port may access these endpoints. To restrict access, we recommend using [Kubernetes network policies](https://kubernetes.io/docs/concepts/services-networking/network-policies/) to restrict access to certain clients.
31+
32+
## Backend Health
33+
34+
### Discovering backend health
35+
36+
Run the following kubectl command to identify your ALB Controller pod and its corresponding IP address.
37+
38+
```bash
39+
kubectl get pods -n azure-alb-system -o wide
40+
```
41+
42+
Example output:
43+
44+
| NAME | READY | STATUS | RESTARTS | AGE | IP | NODE | NOMINATED NODE | READINESS GATES |
45+
| ------------------------------------------ | ----- | ------- | -------- | ---- | ---------- | -------------------------------- | -------------- | --------------- |
46+
| alb-controller-74df7896b-gfzfc | 1/1 | Running | 0 | 60m | 10.1.0.247 | aks-userpool-21921599-vmss000000 | \<none\> | \<none\> |
47+
| alb-controller-bootstrap-5f7f8f5d4f-gbstq | 1/1 | Running | 0 | 60m | 10.1.1.183 | aks-userpool-21921599-vmss000001 | \<none\> | \<none\> |
48+
49+
Once you have the IP address of your alb-controller pod, you may validate the backend health service is running by browsing to http://\<pod-ip\>:8000.
50+
51+
For example, the following command may be run:
52+
```bash
53+
curl http://10.1.0.247:8000
54+
```
55+
56+
Example response:
57+
```
58+
Available paths:
59+
Path: /backendHealth
60+
Description: Prints the backend health of the ALB.
61+
Query Parameters:
62+
detailed: if true, prints the detailed view of the backend health
63+
alb-id: Resource ID of the Application Gateway for Containers to filter backend health for.
64+
service-name: Service to filter backend health for. Expected format: \<namespace\>/\<service\>/\<service-port-number\>
65+
66+
Path: /
67+
Description: Prints the help
68+
```
69+
70+
### Summarized backend health by Application Gateway for Containers
71+
72+
This experience summarizes of all Kubernetes services with references to Application Gateway for Containers and their corresponding health status.
73+
74+
This experience may be accessed by specifying the Application Gateway for Containers resource ID in the query of the request to the alb-controller pod.
75+
76+
The following command can be used to probe backend health for the specified Application Gateway for Containers resource.
77+
```bash
78+
curl http://\<alb-controller-pod-ip-address\>:8000/backendHealth?alb-id=/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/yyyyyyyy/providers/Microsoft.ServiceNetworking/trafficControllers/zzzzzzzzzz
79+
```
80+
81+
Example output:
82+
```json
83+
{
84+
"services": [
85+
{
86+
"serviceName": "default/service-hello-world/80",
87+
"serviceHealth": [
88+
{
89+
"albId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/yyyyyyyy/providers/Microsoft.ServiceNetworking/trafficControllers/zzzzzzzzzz",
90+
"totalEndpoints": 1,
91+
"totalHealthyEndpoints": 1,
92+
"totalUnhealthyEndpoints": 0
93+
}
94+
]
95+
},
96+
{
97+
"serviceName": "default/service-contoso/443",
98+
"serviceHealth": [
99+
{
100+
"albId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/yyyyyyyy/providers/Microsoft.ServiceNetworking/trafficControllers/zzzzzzzzzz",
101+
"totalEndpoints": 1,
102+
"totalHealthyEndpoints": 1,
103+
"totalUnhealthyEndpoints": 0
104+
}
105+
]
106+
}
107+
]
108+
}
109+
```
110+
111+
### Summarized backend health by Kubernetes service
112+
113+
This experience searches for the health summary status of a given service.
114+
115+
This experience may be accessed by specifying the name of the namespace, service, and port number of the service in the following format of the query string to the alb-controller pod: _\<namespace\>/\<service\>/\<service-port-number\>_
116+
117+
The following command can be used to probe backend health for the specified Kubernetes service.
118+
```bash
119+
curl http://\<alb-controller-pod-ip-address\>:8000/backendHealth?service-name=default/service-hello-world/80
120+
```
121+
122+
Example output:
123+
```json
124+
{
125+
"services": [
126+
{
127+
"serviceName": "default/service-hello-world/80",
128+
"serviceHealth": [
129+
{
130+
"albId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/yyyyyyyy/providers/Microsoft.ServiceNetworking/trafficControllers/zzzzzzzzzz",
131+
"totalEndpoints": 1,
132+
"totalHealthyEndpoints": 1,
133+
"totalUnhealthyEndpoints": 0
134+
}
135+
]
136+
}
137+
]
138+
}
139+
```
140+
141+
### Detailed backend health for a specified Kubernetes service
142+
143+
This experience shows all endpoints that make up the service, including their corresponding health status and IP address. Endpoint status is reported as either _HEALTHY_ or _UNHEALTHY_.
144+
145+
This experience may be accessed by specifying detailed=true in the query string to the alb-controller pod.
146+
147+
For example, we can verify individual endpoint health by executing the following command:
148+
```bash
149+
curl http://\<alb-controller-pod-ip-address\>:8000/backendHealth?service-name=default/service-hello-world/80\&detailed=true
150+
```
151+
152+
Example output:
153+
```json
154+
{
155+
"services": [
156+
{
157+
"serviceName": "default/service-hello-world/80",
158+
"serviceHealth": [
159+
{
160+
"albId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/yyyyyyyy/providers/Microsoft.ServiceNetworking/trafficControllers/zzzzzzzzzz",
161+
"totalEndpoints": 1,
162+
"totalHealthyEndpoints": 1,
163+
"totalUnhealthyEndpoints": 0,
164+
"endpoints": [
165+
{
166+
"address": "10.1.1.22",
167+
"health": {
168+
"status": "HEALTHY"
169+
}
170+
}
171+
]
172+
}
173+
]
174+
}
175+
]
176+
}
177+
```
178+
179+
## Metrics
180+
181+
ALB Controller currently surfaces metrics following [text based format](https://prometheus.io/docs/instrumenting/exposition_formats/#text-based-format) to be exposed to Prometheus.
182+
183+
The following Application Gateway for Containers specific metrics are currently available today:
184+
185+
| Metric Name | Description |
186+
| ----------- | ------------------------------------------------------------------------------------- |
187+
| alb_connection_status | Connection status to an Application Gateway for Containers resource |
188+
| alb_reconnection_count | Number of reconnection attempts to an Application Gateway for Containers resources |
189+
| total_config_updates | Number of service routing config operations |
190+
| total_endpoint_updates | Number of backend pool config operations |
191+
| total_deployments | Number of Application Gateway for Containers resource deployments |
192+
| total_endpoints | Number of endpoints in a service |
193+
| total_healthy_endpoints | Number of healthy endpoints in a service |
194+
| total_unhealthy_endpoints | Number of unhealthy endpoints in a service |
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: Release notes for ALB Controller
3+
description: This article lists updates made to the Application Gateway for Containers ALB Controller
4+
services: application-gateway
5+
author: greglin
6+
ms.service: application-gateway
7+
ms.subservice: appgw-for-containers
8+
ms.topic: article
9+
ms.date: 07/24/2023
10+
ms.author: greglin
11+
---
12+
13+
# Release notes for ALB Controller
14+
15+
This article provides details about changes to the ALB Controller for Application Gateway for Containers.
16+
17+
The ALB Controller is a Kubernetes deployment that orchestrates configuration and deployment of Application Gateway for Containers. It uses both ARM and configuration APIs to propagate configuration to the Application Gateway for Containers Azure deployment.
18+
19+
Each release of ALB Controller has a documented helm chart version and supported Kubernetes cluster version.
20+
21+
Instructions for new or existing deployments of ALB Controller are found in the following links:
22+
- [New deployment of ALB Controller](quickstart-deploy-application-gateway-for-containers-alb-controller.md#for-new-deployments)
23+
- [Upgrade existing ALB Controller](quickstart-deploy-application-gateway-for-containers-alb-controller.md#for-existing-deployments)
24+
25+
## Release history
26+
27+
July 24, 2023 - 0.4.023921 - Initial release of ALB Controller
28+
* Minimum supported Kubernetes version: v1.25

0 commit comments

Comments
 (0)