robusta-dev / krr

Prometheus-based Kubernetes Resource Recommendations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Victoria Metrics single detected but isn't used

fenio opened this issue · comments

Describe the bug
Seems that krr detects that cluster uses Victoria Metrics single but still without specifying endpoint it can't find metrics.

To Reproduce
Run krr --simple with cluster running VM single:

[☸ lab:network] [⏱ 13s]
❯ ~ krr simple


 _____       _               _          _  _______  _____
|  __ \     | |             | |        | |/ /  __ \|  __ \
| |__) |___ | |__  _   _ ___| |_ __ _  | ' /| |__) | |__) |
|  _  // _ \| '_ \| | | / __| __/ _` | |  < |  _  /|  _  /
| | \ \ (_) | |_) | |_| \__ \ || (_| | | . \| | \ \| | \ \
|_|  \_\___/|_.__/ \__,_|___/\__\__,_| |_|\_\_|  \_\_|  \_\



Running Robusta's KRR (Kubernetes Resource Recommender) v1.6.0
Using strategy: Simple
Using formatter: table

[INFO] Using clusters: ['lab']
on 0: [INFO] Listing scannable objects in lab
on 0: [INFO] Connecting to Prometheus for lab cluster
on 0: [INFO] Connecting to Victoria for lab cluster
on 0: [INFO] Using Victoria at https://10.10.20.99:6443/api/v1/namespaces/monitor/services/vmsingle-vm:8429/proxy for cluster lab
on 0: [INFO] Connecting to Thanos for lab cluster
on 0: [ERROR] No Prometheus or metrics service found

Expected behavior
I'd expect it to fetch metrics and work fine.

Desktop (please complete the following information):

  • k8s: k0s 1.29

In short despite krr detecting that cluster is running vm single I still have to enable port forward and run it with ❯ ~ krr simple -p http://127.0.0.1:8429 to get actual recommendations.

Not sure why it tries to fetch Prometheus data through proxy.
I guess once it detects that there's VM instance in cluster it should establish connection to vmsingle inside that cluster.

[☸ lab:network]
❯ ~ krr simple -p http://127.0.0.1:8429


 _____       _               _          _  _______  _____
|  __ \     | |             | |        | |/ /  __ \|  __ \
| |__) |___ | |__  _   _ ___| |_ __ _  | ' /| |__) | |__) |
|  _  // _ \| '_ \| | | / __| __/ _` | |  < |  _  /|  _  /
| | \ \ (_) | |_) | |_| \__ \ || (_| | | . \| | \ \| | \ \
|_|  \_\___/|_.__/ \__,_|___/\__\__,_| |_|\_\_|  \_\_|  \_\



Running Robusta's KRR (Kubernetes Resource Recommender) v1.6.0
Using strategy: Simple
Using formatter: table

[INFO] Using clusters: ['lab']
on 0: [INFO] Listing scannable objects in lab
on 0: [INFO] Connecting to Prometheus for lab cluster
on 0: [INFO] Using Prometheus at http://127.0.0.1:8429 for cluster lab
on 0: [INFO] Prometheus found
on 0: [INFO] Prometheus connected successfully for lab cluster

I believe this might be the same issue I mentioned here:

robusta-dev/prometrix#6