VMware Aria Operations for Applications is a high-performance streaming analytics platform for monitoring and optimizing your environment and applications.
The Operations for Applications HPA (Horizontal Pod Autoscaler) adapter for Kubernetes implements the Kubernetes custom.metrics.k8s.io/v1beta1
and external.metrics.k8s.io/v1beta1
APIs allowing you to autoscale pods based on metrics available within Operations for Applications.
- Kubernetes 1.9+
- The aggregation layer needs to be enabled in your Kubernetes cluster prior to deploying the Operations for Applications HPA adapter.
Refer to the Getting Started guide for an overview of the functionality provided by this adapter.
Refer to the Configuration documentation for detailed configuration options.
Refer to the helm chart to install the adapter using Helm.
- Clone this repo.
- Edit the
wavefront-url
andwavefront-token
properties indeploy/manifests/05-custom-metrics-apiserver-deployment.yaml
. - Optionally, edit the
deploy/manifests/04-custom-metrics-config-map.yaml
and modify the external metrics you wish to export. - Finally run
kubectl apply -f deploy/manifests
to deploy the adapter in your Kubernetes cluster.
To verify the installation, run kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta1" | jq .
. You should get the list of supported metrics similar to:
{
"kind": "APIResourceList",
"apiVersion": "v1",
"groupVersion": "custom.metrics.k8s.io/v1beta1",
"resources": [
{
"name": "nodes/cpu.node_reservation",
"singularName": "",
"namespaced": false,
"kind": "MetricValueList",
"verbs": [
"get"
]
},
{
"name": "pods/network.rx_errors_rate",
"singularName": "",
"namespaced": true,
"kind": "MetricValueList",
"verbs": [
"get"
]
},
{
"name": "pods/network.tx_rate",
"singularName": "",
"namespaced": true,
"kind": "MetricValueList",
"verbs": [
"get"
]
},
{
"name": "pods/cpu.request",
"singularName": "",
"namespaced": true,
"kind": "MetricValueList",
"verbs": [
"get"
]
}
]
}
You can similarly run kubectl get --raw "/apis/external.metrics.k8s.io/v1beta1" | jq .
to verify the external metrics API.
See the sample configurations under hpa-examples on how to autoscale deployments based on metrics under the custom or external metrics APIs.
Run kubectl describe hpa example-hpa-custom-metrics
to verify the autoscaling works.