Horizontal Pod Autoscaling

    The current stable version, which only includes support for CPU autoscaling, can be found in the API version. The alpha version, which includes support for scaling on memory and custom metrics, can be found in autoscaling/v2beta1 (and autoscaling/v2beta2 in 1.12 and later).

    While the above links go into details on how Kubernetes needs to be configured to work with HPA, a lot of that work is already done for you by kOps. Specifically:

    • Enable the Aggregation Layer via the following kube-apiserver flags:
    • --requestheader-client-ca-file=<path to aggregator CA cert>
    • --requestheader-extra-headers-prefix=X-Remote-Extra-
    • --requestheader-group-headers=X-Remote-Group
    • --proxy-client-key-file=<path to aggregator proxy key>
    • Enable … set the appropriate flags for kube-controller-manager:
    • --horizontal-pod-autoscaler-use-rest-clients should be true.

    Support For Custom Metrics

    To enable the custom metrics API, register it via the API aggregation layer. If you’re using Prometheus, checkout the .