diff --git a/lib/promscrape/discovery/kubernetes/api.go b/lib/promscrape/discovery/kubernetes/api.go index 1d319a671..e79ef6325 100644 --- a/lib/promscrape/discovery/kubernetes/api.go +++ b/lib/promscrape/discovery/kubernetes/api.go @@ -528,6 +528,9 @@ func getAPIPath(objectName, namespace, query string) string { if len(query) > 0 { suffix += "?" + query } + if objectName == "ingresses" { + return "/apis/networking.k8s.io/v1beta1/" + suffix + } if objectName == "endpointslices" { return "/apis/discovery.k8s.io/v1beta1/" + suffix }