kube-state-metrics/docs
Kaito Ii a601d33bb4 Fix typo
Signed-off-by: Kaito Ii <kaitoii1111@gmail.com>
2022-06-30 20:55:28 +09:00
..
design docs: rename the Documentation folder to docs 2019-02-19 21:06:44 -08:00
developer Update the developer documentation for adding a new resource metric collector 2022-06-29 23:59:32 +02:00
README.md add role and cluster role 2022-06-30 20:55:25 +09:00
certificatesigningrequest-metrics.md Mark new annotations metrics as EXPERIMENTAL 2021-08-15 18:11:36 +02:00
cli-arguments.md add role and cluster role 2022-06-30 20:55:25 +09:00
clusterrole-metrics.md Fix typo 2022-06-30 20:55:28 +09:00
configmap-metrics.md Expose configmap labels and annotations 2021-09-21 12:52:40 +03:00
cronjob-metrics.md Add missing LastSuccessfulTime metric 2022-05-16 18:38:41 +10:00
customresourcestate-metrics.md fix: remove dots in flag names 2022-06-01 09:21:05 -05:00
daemonset-metrics.md Mark new annotations metrics as EXPERIMENTAL 2021-08-15 18:11:36 +02:00
deployment-metrics.md Merge remote-tracking branch 'origin/master' into annotations 2021-08-16 08:50:02 +02:00
endpoint-metrics.md kube_endpoint_address now has a ready label 2022-06-22 13:35:33 +02:00
horizontalpodautoscaler-metrics.md Add the "kube_horizontalautoscaler_info" metric docs 2021-12-08 18:44:31 +01:00
ingress-metrics.md Add ingressclass to kube_ingress_info metric 2021-12-16 10:59:23 +11:00
job-metrics.md Mark new annotations metrics as EXPERIMENTAL 2021-08-15 18:11:36 +02:00
lease-metrics.md add leases collector 2020-01-30 08:31:01 +03:00
limitrange-metrics.md Merge release-1.7 into upstream/master 2019-08-05 10:46:00 -07:00
mutatingwebhookconfiguration-metrics.md Fix metrics & labels documentation 2020-02-27 20:37:53 +01:00
namespace-metrics.md Mark new annotations metrics as EXPERIMENTAL 2021-08-15 18:11:36 +02:00
networkpolicy-metrics.md Add kube_*_annotations metrics 2021-04-29 16:04:16 +02:00
node-metrics.md Update kube_node_status_allocatable unit doc 2022-06-16 17:26:33 -07:00
persistentvolume-metrics.md fixed .md formatting 2022-05-30 17:51:21 +01:00
persistentvolumeclaim-metrics.md fixed .md formatting 2022-05-30 17:51:21 +01:00
pod-metrics.md Add metric for pod tolerations (Ref: #1744) 2022-06-29 17:56:52 +02:00
poddisruptionbudget-metrics.md Implement kube_*_labels and kube_*_annotations metrics for pdb 2021-10-26 21:19:40 +05:30
replicaset-metrics.md Mark new annotations metrics as EXPERIMENTAL 2021-08-15 18:11:36 +02:00
replicationcontroller-metrics.md Add kube_replicationcontroller_owner 2020-02-18 22:24:17 +01:00
resourcequota-metrics.md Merge release-1.7 into upstream/master 2019-08-05 10:46:00 -07:00
role-metrics.md add role and cluster role 2022-06-30 20:55:25 +09:00
secret-metrics.md Mark new annotations metrics as EXPERIMENTAL 2021-08-15 18:11:36 +02:00
service-metrics.md Upgrade doc for service metrics of add uid 2022-02-20 00:36:28 +08:00
serviceaccount-metrics.md Add support for the ServiceAccount resource (Ref: #1717) 2022-06-29 23:58:01 +02:00
statefulset-metrics.md Merge remote-tracking branch 'origin/master' into annotations 2021-08-16 08:50:02 +02:00
storageclass-metrics.md Mark new annotations metrics as EXPERIMENTAL 2021-08-15 18:11:36 +02:00
validatingwebhookconfiguration-metrics.md Fix metrics & labels documentation 2020-02-27 20:37:53 +01:00
verticalpodautoscaler-metrics.md Add kube_*_annotations metrics 2021-04-29 16:04:16 +02:00
volumeattachment-metrics.md volumeattachment: Fix instrumentation guideline violation 2020-04-08 10:55:33 +02:00

README.md

Documentation

This documentation is intended to be a complete reflection of the current state of the exposed metrics of kube-state-metrics.

Any contribution to improving this documentation or adding sample usages will be appreciated.

Table of Contents

Metrics Stages

Stages about metrics are grouped into three categories

Stage Description
EXPERIMENTAL Metrics which normally correspond to the Kubernetes API object alpha status or spec fields and can be changed at any time.
STABLE Metrics which should have very few backwards-incompatible changes outside of major version updates.
DEPRECATED Metrics which will be removed once the deprecation timeline is met.

Opt-in Metrics

As of v2.3.0, kube-state-metrics supports additional opt-in metrics via the CLI flag --metric-opt-in-list. See the metric documentation to identify which metrics need to be specified.

Exposed Metrics

Per group of metrics there is one file for each metrics. See each file for specific documentation about the exposed metrics:

Join Metrics

When an additional, not provided by default label is needed, a Prometheus matching operator can be used to extend single metrics output.

This example adds label_release to the set of default labels of the kube_pod_status_ready metric and allows you select or group the metrics by Helm release label:

kube_pod_status_ready * on (namespace, pod) group_left(label_release) kube_pod_labels

Another useful example would be to query the memory usage of pods by its phase, such as Running:

sum(kube_pod_container_resource_requests{resource="memory"}) by (namespace, pod, node)
  * on (namespace, pod) group_left() (sum(kube_pod_status_phase{phase="Running"}) by (pod, namespace) == 1)

Metrics from Custom Resources

See Custom Resource State Metrics for experimental support for custom resources.

CLI Arguments

Additionally, options for kube-state-metrics can be passed when executing as a CLI, or in a kubernetes / openshift environment. More information can be found here: CLI Arguments