Metric name | Metric type | Labels/tags | Status |
---|---|---|---|
kube_verticalpodautoscaler_annotations | Gauge | annotation_app =<foo> namespace =<namespace> target_api_version =<api version> target_kind =<target kind> target_name =<target name> verticalpodautoscaler =<vertical pod autoscaler name> |
EXPERIMENTAL |
kube_verticalpodautoscaler_spec_resourcepolicy_container_policies_minallowed | Gauge | container =<container name> namespace =<namespace> resource =<cpu memory> target_api_version =<api version> target_kind =<target kind> target_name =<target name> unit =<core byte> verticalpodautoscaler =<vertical pod autoscaler name> |
EXPERIMENTAL |
kube_verticalpodautoscaler_spec_resourcepolicy_container_policies_maxallowed | Gauge | container =<container name> namespace =<namespace> resource =<cpu memory> target_api_version =<api version> target_kind =<target kind> target_name =<target name> unit =<core byte> verticalpodautoscaler =<vertical pod autoscaler name> |
EXPERIMENTAL |
kube_verticalpodautoscaler_status_recommendation_containerrecommendations_lowerbound | Gauge | container =<container name> namespace =<namespace> resource =<cpu memory> target_api_version =<api version> target_kind =<target kind> target_name =<target name> unit =<core byte> verticalpodautoscaler =<vertical pod autoscaler name> |
EXPERIMENTAL |
kube_verticalpodautoscaler_status_recommendation_containerrecommendations_target | Gauge | container =<container name> namespace =<namespace> resource =<cpu memory> target_api_version =<api version> target_kind =<target kind> target_name =<target name> unit =<core byte> verticalpodautoscaler =<vertical pod autoscaler name> |
EXPERIMENTAL |
kube_verticalpodautoscaler_status_recommendation_containerrecommendations_uncappedtarget | Gauge | container =<container name> namespace =<namespace> resource =<cpu memory> target_api_version =<api version> target_kind =<target kind> target_name =<target name> unit =<core byte> verticalpodautoscaler =<vertical pod autoscaler name> |
EXPERIMENTAL |
kube_verticalpodautoscaler_status_recommendation_containerrecommendations_upperbound | Gauge | container =<container name> namespace =<namespace> resource =<cpu memory> target_api_version =<api version> target_kind =<target kind> target_name =<target name> unit =<core byte> verticalpodautoscaler =<vertical pod autoscaler name> |
EXPERIMENTAL |
kube_verticalpodautoscaler_labels | Gauge | label_app =<foo> namespace =<namespace> target_api_version =<api version> target_kind =<target kind> target_name =<target name> verticalpodautoscaler =<vertical pod autoscaler name> |
EXPERIMENTAL |
kube_verticalpodautoscaler_spec_updatepolicy_updatemode | Gauge | namespace =<namespace> target_api_version =<api version> target_kind =<target kind> target_name =<target name> update_mode =<foo> verticalpodautoscaler =<vertical pod autoscaler name> |
EXPERIMENTAL |
Vertical Pod Autoscalers(VPAs) are managed as custom resources.
To enable the Vertical Pod Autoscaler collector, please:
- Ensure that the Vertical Pod Autoscaler CRDs are installed in the cluster. The CRDs are here.
- Ensure that
verticalpodautoscalers
is included in list ofResources
enabled using the flag--resources
whenkube-state-metrics
is run (see below).
One of the command line arguments for kube-state-metrics
is --resources
. If this flag is omitted, a default set of Resources is enabled. This default list does not include Vertical Pod Autoscalers.
To enable Vertical Pod Autoscalers, the kube-state-metrics
flag --resource
must be included when the binary is run and the list of resources must include verticalpodautoscalers
.
The following configures kube-state-metrics
on the command line and in the args
section of a Kubernetes manifest. Because neither command includes the --resource
flag, the default set of resources will be include but metrics for Vertical Pod Autoscalers will not be included:
Shell:
kube-state-metrics \
--telemetry-port=8081 \
--kubeconfig=... \
--apiserver=...
Kubernetes:
spec:
template:
spec:
containers:
- args:
- --telemetry-port=8081
- --kubeconfig=...
- --apiserver=...
To include Vertical Pod Autoscaler metrics, you must include the --resources
flag and to include the default resources, you must include the list of default resources and verticalpodautoscalers
, i.e.:
Shell:
kube-state-metrics \
--telemetry-port=8081 \
--kubeconfig=... \
--apiserver=... \
--resources=certificatesigningrequests,configmaps,cronjobs,daemonsets,deployments,endpoints,horizontalpodautoscalers, ingresses,jobs,leases,limitranges,mutatingwebhookconfigurations,namespaces,networkpolicies,nodes,persistentvolumeclaims,persistentvolumes,poddisruptionbudgets,pods,replicasets,replicationcontrollers,resourcequotas,secrets,services,statefulsets,storageclasses,validatingwebhookconfigurations,verticalpodautoscalers,volumeattachments
Kubernetes:
spec:
template:
spec:
containers:
- args:
- --telemetry-port=8081
- --kubeconfig=...
- --apiserver=...
- --resources=certificatesigningrequests,configmaps,cronjobs,daemonsets,deployments,endpoints,horizontalpodautoscalers, ingresses,jobs,leases,limitranges,mutatingwebhookconfigurations,namespaces,networkpolicies,nodes,persistentvolumeclaims,persistentvolumes,poddisruptionbudgets,pods,replicasets,replicationcontrollers,resourcequotas,secrets,services,statefulsets,storageclasses,validatingwebhookconfigurations,verticalpodautoscalers,volumeattachments
To confirm that a kube-state-metrics
process includes verticalpodautoscalers
, you can:
Shell:
ps aux \
| grep kube-state-metrics \
| grep verticalpodautoscalers
Kubernetes: assuming your deployment is called kube-state-metrics
:
DEPLOYMENT="kube-state-metrics"
NAMESPACE="default"
kubectl get deployment/${DEPLOYMENT} \
--namespace=${NAMESPACE} \
--output=jsonpath="{range .spec.template.spec.containers[?(@.name=='kube-state-metrics')].args[*]}{@}{'\n'}{end}"
Should include (among other --flags
):
--resources=certificatesigningrequests,configmaps,cronjobs,daemonsets,deployments,endpoints,horizontalpodautoscalers,ingresses,jobs,leases,limitranges,mutatingwebhookconfigurations,namespaces,networkpolicies,nodes,persistentvolumeclaims,persistentvolumes,poddisruptionbudgets,pods,replicasets,replicationcontrollers,resourcequotas,secrets,services,statefulsets,storageclasses,validatingwebhookconfigurations,verticalpodautoscalers,volumeattachments