kube-prometheus icon indicating copy to clipboard operation
kube-prometheus copied to clipboard

Update network policy to get metrics from adapter

Open gabrielb77 opened this issue 1 year ago • 1 comments

kubectl top nodes & kubectl top pods -A fails

prometheus-adapter logs: E0910 20:08:11.883369 1 provider.go:284] failed querying node metrics: unable to fetch node CPU metrics: unable to execute query: Get "http://prometheus-k8s.monitoring.svc:9090/api/v1/query?query=sum+by+%28node%29+%28%0A++1+-+irate%28%0A++++node_cpu_seconds_total%7Bmode%3D%22idle%22%7D%5B60s%5D%0A++%29%0A++%2A+on%28namespace%2C+pod%29+group_left%28node%29+%28%0A++++node_namespace_pod%3Akube_pod_info%3A%7Bnode%3D~%22k8s-n06%7Ck8s-n01%7Ck8s-n02%7Ck8s-n03%7Ck8s-n04%7Ck8s-n05%22%7D%0A++%29%0A%29%0Aor+sum+by+%28node%29+%28%0A++1+-+irate%28%0A++++windows_cpu_time_total%7Bmode%3D%22idle%22%2C+job%3D%22windows-exporter%22%2Cnode%3D~%22k8s-n06%7Ck8s-n01%7Ck8s-n02%7Ck8s-n03%7Ck8s-n04%7Ck8s-n05%22%7D%5B4m%5D%0A++%29%0A%29%0A&time=1662840461.882": dial tcp 10.104.93.219:9090: i/o timeout

Description

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

Type of change

What type of changes does your code introduce to the kube-prometheus? Put an x in the box that apply.

  • [x] CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • [ ] FEATURE (non-breaking change which adds functionality)
  • [ ] BUGFIX (non-breaking change which fixes an issue)
  • [ ] ENHANCEMENT (non-breaking change which improves existing functionality)
  • [ ] NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Changelog entry

Please put a one-line changelog entry below. Later this will be copied to the changelog file.


gabrielb77 avatar Sep 10 '22 20:09 gabrielb77

kubectl top nodes/pods stopped working after kube-prometheus install

gabrielb77 avatar Sep 10 '22 20:09 gabrielb77

I think this should be implémented in jsonnet too

jouve avatar Oct 05 '22 20:10 jouve