kube-state-metrics/docs
Kubernetes Prow Robot 03e84f55d6
Merge pull request #1551 from dgrisonnet/revert-init-containers-requests
Revert init containers resource metrics rework
2021-09-30 06:06:08 -07:00
..
design
developer Rename collector to resource 2020-02-05 19:43:23 -06:00
README.md docs: Fix typo 2021-07-13 17:01:00 +02:00
certificatesigningrequest-metrics.md Mark new annotations metrics as EXPERIMENTAL 2021-08-15 18:11:36 +02:00
cli-arguments.md Merge remote-tracking branch 'origin/master' into annotations 2021-08-19 16:31:20 +02:00
configmap-metrics.md Expose configmap labels and annotations 2021-09-21 12:52:40 +03:00
cronjob-metrics.md Merge remote-tracking branch 'origin/master' into annotations 2021-08-16 08:50:02 +02: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 Mark new annotations metrics as EXPERIMENTAL 2021-08-15 18:11:36 +02:00
horizontalpodautoscaler-metrics.md Fix kube_horizontalpodautoscaler_annotations status 2021-08-16 13:45:51 +02:00
ingress-metrics.md Mark new annotations metrics as EXPERIMENTAL 2021-08-15 18:11:36 +02: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 Merge remote-tracking branch 'origin/master' into annotations 2021-08-16 08:50:02 +02:00
persistentvolume-metrics.md Mark new annotations metrics as EXPERIMENTAL 2021-08-15 18:11:36 +02:00
persistentvolumeclaim-metrics.md Mark new annotations metrics as EXPERIMENTAL 2021-08-15 18:11:36 +02:00
pod-metrics.md Merge pull request #1551 from dgrisonnet/revert-init-containers-requests 2021-09-30 06:06:08 -07:00
poddisruptionbudget-metrics.md Merge release-1.7 into upstream/master 2019-08-05 10:46:00 -07:00
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
secret-metrics.md Mark new annotations metrics as EXPERIMENTAL 2021-08-15 18:11:36 +02:00
service-metrics.md Mark new annotations metrics as EXPERIMENTAL 2021-08-15 18:11:36 +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.

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)

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