diff --git a/plugins/inputs/prometheus/kubernetes.go b/plugins/inputs/prometheus/kubernetes.go index fc76ee49a..c8cff40df 100644 --- a/plugins/inputs/prometheus/kubernetes.go +++ b/plugins/inputs/prometheus/kubernetes.go @@ -430,7 +430,7 @@ func getScrapeURL(pod *corev1.Pod, p *Prometheus) (*url.URL, error) { scheme = "http" } - if port == "" { + if port == "" || port == "0" { port = "9102" }