kubecost / cost-analyzer-helm-chart

Kubecost helm chart
http://kubecost.com/install
Apache License 2.0
458 stars 410 forks source link

[Bug] Network Costs container always binds to 0.0.0.0 interface #3517

Closed konstantindobroliubov closed 1 week ago

konstantindobroliubov commented 1 week ago

Kubecost Helm Chart Version

2.2.2

Kubernetes Version

1.29

Kubernetes Platform

EKS

Description

network-costs daemonset deployed with helm chart creates daemon Pods. In every Pod, I see:

/net # netstat -lntu | grep 3001
tcp        0      0 0.0.0.0:3001            0.0.0.0:*               LISTEN

Which means that /rust/bin/network-costs-rs binary which does all the magic uses IPv4 interface. That makes it useless in IPv6-only environments.

Steps to reproduce

  1. Deploy helm chart with network-costs DaemonSet in IPv6-only environment.
  2. SSH into the pod.
  3. From the pod, run: wget -O- http://0.0.0.0:3001/metrics

Expected behavior

Ideally, detect available interfaces on a startup and bind to :: if running in IPv6 environment. Another option - just allow to override this parameter via helm chart flag.

Impact

Network-costs don't work in IPv6-only clusters.

Screenshots

No response

Logs

No response

Slack discussion

No response

Troubleshooting

chipzoller commented 1 week ago

Previously logged at https://github.com/kubecost/features-bugs/issues/27