kube-state-metrics/docs
Manuel Rüger 2a7a96b659 Rename cli flag from label-metrics-allow-list to metric-labels-allowlist
This might be more clear on what the flag is doing. There were two ways
to spell allow-list / allowlist which it removes as well

Fixes: https://github.com/kubernetes/kube-state-metrics/issues/1421
2021-03-26 13:11:19 +01:00
..
design docs: rename the Documentation folder to docs 2019-02-19 21:06:44 -08:00
developer Rename collector to resource 2020-02-05 19:43:23 -06:00
README.md Fix metrics & labels documentation 2020-02-27 20:37:53 +01:00
certificatessigningrequest-metrics.md Merge release-1.7 into upstream/master 2019-08-05 10:46:00 -07:00
cli-arguments.md Rename cli flag from label-metrics-allow-list to metric-labels-allowlist 2021-03-26 13:11:19 +01:00
configmap-metrics.md docs/*: Update resource version metrics 2019-12-12 09:44:18 +01:00
cronjob-metrics.md Merge release-1.7 into upstream/master 2019-08-05 10:46:00 -07:00
daemonset-metrics.md Update DaemonSet updated_number_scheduled metric name to be consistent 2020-07-24 19:47:35 -07:00
deployment-metrics.md Fix metrics & labels documentation 2020-02-27 20:37:53 +01:00
endpoint-metrics.md Merge release-1.7 into upstream/master 2019-08-05 10:46:00 -07:00
horizontalpodautoscaler-metrics.md Fix metrics & labels documentation 2020-02-27 20:37:53 +01:00
ingress-metrics.md Fix typo 2020-03-25 16:39:34 +09:00
job-metrics.md Added the job failure reason in kube_job_status_failed metric 2020-10-12 18:49:18 +05:30
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 Fix metrics & labels documentation 2020-02-27 20:37:53 +01:00
networkpolicy-metrics.md store: export NetworkPolicy objects 2019-10-17 11:49:29 +01:00
node-metrics.md add internal_ip to node_info 2020-07-22 10:58:11 -04:00
persistentvolume-metrics.md feat(persistentvolume): introduce kube_persistentvolume_claim_ref 2020-10-19 08:44:34 +02:00
persistentvolumeclaim-metrics.md -m ADD kube_persistentvolumeclaim_status_condition metric for information about status of different conditions of persistent volume claim. 2019-10-26 04:49:41 +05:30
pod-metrics.md docs/pod-metrics.md: Adjust docs and stability 2021-02-24 17:00:27 +01:00
poddisruptionbudget-metrics.md Merge release-1.7 into upstream/master 2019-08-05 10:46:00 -07:00
replicaset-metrics.md Fix metrics & labels documentation 2020-02-27 20:37:53 +01: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 docs/*: Update resource version metrics 2019-12-12 09:44:18 +01:00
service-metrics.md Update service-metrics.md 2020-10-13 17:30:33 +09:00
statefulset-metrics.md fix typo in statefulset metrics documentation 2020-03-25 17:53:08 +09:00
storageclass-metrics.md Renamed storage class labels 2020-03-27 11:32:51 +05:30
validatingwebhookconfiguration-metrics.md Fix metrics & labels documentation 2020-02-27 20:37:53 +01:00
verticalpodautoscaler-metrics.md Label/Tags are shown in status tab 2020-08-31 20:08:13 +05:30
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