From ab3fd0de7e73fb1026406a28cfef6aa30949732a Mon Sep 17 00:00:00 2001 From: Ken'ichi Ohmichi Date: Fri, 3 Aug 2018 10:00:03 -0700 Subject: [PATCH] Add necessity of metrics-server for HPA (#9729) * Add necessity of metrics-server for HPA Current HPA doc1 mentions metrics-server like For resource metrics, this is the metrics.k8s.io API, generally provided by metrics-server. It can be launched as a cluster addon. The metrics.k8s.io API is mandatory for HPA, so the above means metrics-server needs to be launched for HPA. However it is difficult to understand that requirement because the above seems metrics-server as just a addon, and that is described on small section. In addition, many people are facing HPA issue that fetching metrics doesn't work on the internet like $ kubectl get hpa NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE nginx Deployment/nginx /50% 1 3 0 7s The above sample "" shows HPA feature cannot get current metrics due to metrics-server doesn't work fine. This adds necessity of metrics-server for HPA directly to solve the problem. fixes: #9728 * Copyedit --- .../tasks/run-application/horizontal-pod-autoscale.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md b/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md index 3bff9a2196..8ff9bf2530 100644 --- a/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md +++ b/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md @@ -61,8 +61,15 @@ or the custom metrics API (for all other metrics). in question), and compared to the target value, to produce a ratio as above. The HorizontalPodAutoscaler normally fetches metrics from a series of aggregated APIs (`metrics.k8s.io`, -`custom.metrics.k8s.io`, and `external.metrics.k8s.io`). It can also fetch metrics directly -from Heapster. Fetching metrics from Heapster is deprecated as of Kubernetes 1.11. +`custom.metrics.k8s.io`, and `external.metrics.k8s.io`). The `metrics.k8s.io` API is usually provided by +metrics-server, which needs to be launched separately. See +[metrics-server](https://kubernetes.io/docs/tasks/debug-application-cluster/core-metrics-pipeline/#metrics-server) +for instructions. The HorizontalPodAutoscaler can also fetch metrics directly from Heapster. + +{{< note >}} +{{< feature-state state="deprecated" for_k8s_version="1.11" >}} +Fetching metrics from Heapster is deprecated as of Kubernetes 1.11. +{{< /note >}} See [Support for metrics APIs](#support-for-metrics-apis) for more details.