Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 1.16 KB

readme.md

File metadata and controls

18 lines (12 loc) · 1.16 KB

Node to pod labeler

This container will monitor pods in the system and based on an environment variable LABELS containing node labels separaded by comma, it will read the labels from the node and will copy them to te pod.

Environment Variables

  • LABELS: "eks.amazonaws.com/capacityType,node.kubernetes.io/instance-type" (default: "")
  • EXCLUDED_NAMESPACES: "kube-system,prometheus,etc" (default "")
  • LOG_LEVEL: "DEBUG" (default: "INFO")

Motivation

The inspiration for this was to develop a cost report that could work toghether with the container in the project https://github.com/empathyco/kubernetes-cost-report. empathyco-container would extract price per instance type, and later a prometheus rule would join metrics using node.kubernetes.io/instance-type and eks.amazonaws.com/capacityType.

Next steps

  • Configure kube-state-metrics to expose these labels in the metrics using --metric-labels-allowlist argument
  • Build a prometheus rule to join empathyco instance_cost metric using these new labels on the pod metrics