Additional extension points
There are some additional extension points that don’t fit into the categories we have discussed so far.
Providing custom metrics for horizontal pod autoscaling
Prior to Kubernetes 1.6, custom metrics were implemented as a Heapster model. In Kubernetes 1.6, new custom metrics APIs landed and matured gradually. As of Kubernetes 1.9, they are enabled by default. As you may recall, Keda (https://keda.sh) is a project that focuses on custom metrics for autoscaling. However, if for some reason Keda doesn’t meet your needs, you can implement your own custom metrics. Custom metrics rely on API aggregation. The recommended path is to start with the custom metrics API server boilerplate, available here: https://github.com/kubernetes-sigs/custom-metrics-apiserver.
Then, you can implement the CustomMetricsProvider
interface:
type CustomMetricsProvider interface {
// GetRootScopedMetricByName fetches a particular metric for a particular...