Categorygithub.com/utilitywarehouse/kube-annotations-exporter
repositorypackage
0.0.0-20210910154648-84d1506bfa6d
Repository: https://github.com/utilitywarehouse/kube-annotations-exporter.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

kube-annotations-exporter

Archived in favour of kube-state-metrics. After https://github.com/kubernetes/kube-state-metrics/pull/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"