Skip to content

Commit 4bdcf5d

Browse files
author
Guy Menahem
committed
fix: clarify that the HPA controller selects the pods based on labels
1 parent d7e1bca commit 4bdcf5d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

content/en/docs/tasks/run-application/horizontal-pod-autoscale.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ Kubernetes implements horizontal pod autoscaling as a control loop that runs int
5656
(and the default interval is 15 seconds).
5757

5858
Once during each period, the controller manager queries the resource utilization against the
59-
metrics specified in each HorizontalPodAutoscaler definition. The controller manager
60-
obtains the metrics from either the resource metrics API (for per-pod resource metrics),
59+
metrics specified in each HorizontalPodAutoscaler definition. The controller manager
60+
finds the target resource defined by the `scaleTargetRef`,
61+
then selects the pods based on the target resource's `.spec.selector` labels, and obtains the metrics from either the resource metrics API (for per-pod resource metrics),
6162
or the custom metrics API (for all other metrics).
6263

6364
* For per-pod resource metrics (like CPU), the controller fetches the metrics

0 commit comments

Comments
 (0)