lensapp / lens

Lens - The way the world runs Kubernetes
https://k8slens.dev/
MIT License
22.51k stars 1.47k forks source link

Nodes capacity double size #6111

Open pavel-trubitsyn opened 2 years ago

pavel-trubitsyn commented 2 years ago

Describe the bug Lens shows wrong node's capacity (e.g. memory) when there are several kube_node_status_capacity per node from different jobs. For example:

kube_node_status_capacity{container="kube-state-metrics", endpoint="http", instance="10.200.97.39:8080", job="kube-state-metrics", namespace="monitoring", node="ip-10-200-102-50.eu-north-1.compute.internal", pod="prometheus-kube-state-metrics-7584c65557-qp68z", resource="memory", service="prometheus-kube-state-metrics", unit="byte"}

kube_node_status_capacity{instance="kubecost-cost-analyzer.kubecost.svc:9003", job="kubecost", node="ip-10-200-102-50.eu-north-1.compute.internal", resource="memory", unit="byte"}

In this case Lens sums these metrics and shows 2x capacity.

Expected behavior Lens should use single metric per node (e.g. only from kube-state-metrics).

Screenshots изображение

Environment (please complete the following information):

lisenet commented 2 years ago

Having the same problem as well when Kubecost is deployed.