You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: kubernetes_cluster_autoscaler/README.md
+56Lines changed: 56 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,60 @@ No additional installation is needed on your server.
19
19
20
20
2.[Restart the Agent][5].
21
21
22
+
#### Metric collection
23
+
24
+
Make sure that the Prometheus-formatted metrics are exposed in your `kubernetes_cluster_autoscaler` cluster.
25
+
For the Agent to start collecting metrics, the `kubernetes_cluster_autoscaler` pods need to be annotated.
26
+
27
+
[Kubernetes Cluster Autoscaler][11] has metrics and livenessProbe endpoints that can be accessed on port `8085`. These endpoints are located under `/metrics` and `/health-check` and provide valuable information about the state of your cluster during scaling operations.
28
+
29
+
**Note**: To change the default port, use the `--address` flag.
30
+
31
+
To configure the Cluster Autoscaler to expose metrics, do the following:
32
+
33
+
1. Enable access to the `/metrics` route and expose port `8085` for your Cluster Autoscaler deployment:
34
+
35
+
```
36
+
ports:
37
+
--name: app
38
+
containerPort: 8085
39
+
```
40
+
41
+
b) instruct your Prometheus to scrape it, by adding the following annotation to your Cluster Autoscaler service:
42
+
```
43
+
prometheus.io/scrape: true
44
+
```
45
+
46
+
**Note**: The listed metrics can only be collected if they are available. Some metrics are generated only when certain actions are performed.
47
+
48
+
The only parameter required for configuring the `kubernetes_cluster_autoscaler` check is `openmetrics_endpoint`. This parameter should be set to the location where the Prometheus-formatted metrics are exposed. The default port is `8085`. To configure a different port, use the `METRICS_PORT`[environment variable][10]. In containerized environments, `%%host%%` should be used for [host autodetection][3].
0 commit comments