# Kubernetes custom metrics API for Horizontal Pod Autoscaler

**URL:** <https://discuss.elastic.co/t/kubernetes-custom-metrics-api-for-horizontal-pod-autoscaler/221645>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [March 2, 2020, 8:35am UTC](https://discuss.elastic.co/t/kubernetes-custom-metrics-api-for-horizontal-pod-autoscaler/221645 "2020-03-02T08:35:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Babadofar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/babadofar/32/44803_2.png) [@Babadofar](https://discuss.elastic.co/u/Babadofar)\
**Post date:** [March 2, 2020, 8:35am UTC](https://discuss.elastic.co/t/kubernetes-custom-metrics-api-for-horizontal-pod-autoscaler/221645/1 "2020-03-02T08:35:55Z")

</div>

Hi there.  
I'm curious if there is a way to use metricbeat as a source for scaling resources in Kubernetes using HPA, as described here [https://learnk8s.io/autoscaling-apps-kubernetes](https://learnk8s.io/autoscaling-apps-kubernetes)  
The idea would be for instance to scale up the number of pods based on gathering some metric from the pod, such as number of http requests pr second, kafka consumer lag or whatever.

---

<div class="post-metadata">

**Author:** ![Babadofar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/babadofar/32/44803_2.png) [@Babadofar](https://discuss.elastic.co/u/Babadofar)\
**Post date:** [March 5, 2020, 5:03pm UTC](https://discuss.elastic.co/t/kubernetes-custom-metrics-api-for-horizontal-pod-autoscaler/221645/2 "2020-03-05T17:03:43Z")

</div>

Should just follow this I guess. [https://github.com/kubernetes-sigs/custom-metrics-apiserver/blob/master/docs/getting-started.md](https://github.com/kubernetes-sigs/custom-metrics-apiserver/blob/master/docs/getting-started.md)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 2, 2020, 5:03pm UTC](https://discuss.elastic.co/t/kubernetes-custom-metrics-api-for-horizontal-pod-autoscaler/221645/3 "2020-04-02T17:03:51Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
