Branch: master
Find file History
Latest commit 535ddb5 Jan 22, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
design correct some typographical mistakes in kube-state-metrics Feb 3, 2019
README.md add ingress labels Feb 5, 2019
configmap-metrics.md make status expression standardization Jun 12, 2018
cronjob-metrics.md make status expression standardization Jun 12, 2018
daemonset-metrics.md make status expression standardization Jun 12, 2018
deployment-metrics.md make status expression standardization Jun 12, 2018
endpoint-metrics.md make status expression standardization Jun 12, 2018
horizontalpodautoscaler-metrics.md documentation fixes: i)minor improvements ii)add new hpa labels in do… Feb 4, 2019
ingress-metrics.md add ingress labels Feb 5, 2019
job-metrics.md fix labels for kube_job_* metrics Jan 4, 2019
limitrange-metrics.md make status expression standardization Jun 12, 2018
namespace-metrics.md make status expression standardization Jun 12, 2018
node-metrics.md documentation fixes: i)minor improvements ii)add new hpa labels in do… Feb 4, 2019
persistentvolume-metrics.md Typo fix:PersistentVolumeClaim->PersistentVolume Jul 6, 2018
persistentvolumeclaim-metrics.md make status expression standardization Jun 12, 2018
pod-metrics.md documentation fixes: i)minor improvements ii)add new hpa labels in do… Feb 4, 2019
poddisruptionbudget-metrics.md Add PodDisruptionBudget metrics Oct 17, 2018
replicaset-metrics.md Add documentation for kube_replicaset_labels, add namespace label to … Jan 22, 2019
replicationcontroller-metrics.md make status expression standardization Jun 12, 2018
resourcequota-metrics.md make status expression standardization Jun 12, 2018
secret-metrics.md make status expression standardization Jun 12, 2018
service-metrics.md Gather Service.Spec under service_info label Nov 9, 2018
statefulset-metrics.md Add docs Sep 26, 2018

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.

Metrics Deprecation

  • The following non-generic resource metrics for pods are marked deprecated. They will be removed in kube-state-metrics v2.0.0. kube_pod_container_resource_requests and kube_pod_container_resource_limits are the replacements with resource labels representing the resource name and unit labels representing the resource unit.
    • kube_pod_container_resource_requests_cpu_cores
    • kube_pod_container_resource_limits_cpu_cores
    • kube_pod_container_resource_requests_memory_bytes
    • kube_pod_container_resource_limits_memory_bytes
  • The following non-generic resource metrics for nodes are marked deprecated. They will be removed in kube-state-metrics v2.0.0. kube_node_status_capacity and kube_node_status_allocatable are the replacements with resource labels representing the resource name and unit labels representing the resource unit.
    • kube_node_status_capacity_pods
    • kube_node_status_capacity_cpu_cores
    • kube_node_status_capacity_memory_bytes
    • kube_node_status_allocatable_pods
    • kube_node_status_allocatable_cpu_cores
    • kube_node_status_allocatable_memory_bytes

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