You can configure Horizontal Pod Autoscaling (HPA) for an application that exports metrics.
-
Install the OpenShift CLI (
oc
). -
You must log in to the cluster with a user that has the
cluster-admin
role. -
Make sure you configured the cluster for application monitoring. In the following example, it is presumed that Prometheus and Alertmanager instances were installed in the
default
project. See Application monitoring. -
Make sure you configured monitoring for your application. In the following example, it is presumed that the application and the service monitor for it were installed in the
default
project. See Application monitoring. -
Make sure your application exposes metrics using the
prometheus-adapter
. In the following example, it is presumed thatprometheus-adapater
was installed in thedefault
project. See Application monitoring.