Horizontal Pod Autoscaling
The HorizontalPodAutscaler stable API moved to GA in 1.23. The previous stable version, which only includes support for CPU autoscaling, can be found in the autoscaling/v1
API version. The beta version, which includes support for scaling on memory and custom metrics, can be found in autoscaling/v2beta1
in 1.8 - 1.24 (and autoscaling/v2beta2
in 1.12 - 1.25).
While the above links go into details on how Kubernetes needs to be configured to work with HPA, the work is already done for you by kOps. Specifically:
- Enable the Aggregation Layer via the following kube-apiserver flags:
--requestheader-allowed-names=aggregator
--requestheader-group-headers=X-Remote-Group
--proxy-client-cert-file=<path to aggregator proxy cert>
--proxy-client-key-file=<path to aggregator proxy key>
Support For Custom Metrics
To enable the custom metrics API, register it via the API aggregation layer. If you’re using Prometheus, checkout the custom metrics adapter for Prometheus.