<p>I've setup prometheus to collect metrics from my pods and nodes.
I've also setup the prometheus custom metrics adapter.</p>

<p>How can I use those metrics provided by prometheus to autoscale my pods ? I tried to google it but I only find custom pods that provides their metrics on their /metrics url. I would like to be able to autoscale any of my pods that already have a prometheus metric based on the cpu or memory usage.</p>

<p>I can visualize all the metrics in grafana for all my pods and nodes but can't find a way to use it with autoscale</p>

<p>You need to create an HPA (Horizontal Pod Autoscaler)</p>

<p>More info <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-multiple-metrics" rel="nofollow noreferrer">here</a></p>

<p><a href="https://github.com/stefanprodan/k8s-prom-hpa" rel="nofollow noreferrer">This is a good tool</a> showing you how to use an HPA with custom metrics either using a the K8s metrics server or Prometheus.</p>
