Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

utilitywarehouse/kube-annotations-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kube-annotations-exporter

Archived in favour of kube-state-metrics. After kubernetes/kube-state-metrics#1468 - its now able to export annotations as metrics again.

Docker Repository on Quay

Exports pod and namespace annotations as metrics.

The namespace metrics are a substitute for old kube-state-metrics functionality:

Metrics

  • kube_namespace_annotations: includes labels for namespace, key and value
  • kube_pod_annotations: includes labels for pod, namespace, key and value

Cardinality

By default, every annotation is exported for every pod and namespace. This could produce a large number of series, so to mitigate this, you can provide a list of annotations that you want to export with the flags -namespace-annotations and -pod-annotations.

For example:

./kube-annotations-exporter \
  -pod-annotations="prometheus.io/scrape" \
  -pod-annotations="prometheus.io/path" \
  -pod-annotations="kubernetes.io/psp"

The flags can also be provided as a comma-delimited list:

./kube-annotations-exporter \
  -pod-annotations="prometheus.io/scrape,prometheus.io/path,kubernetes.io/psp"