From 50ba25f2735c1e33eeaa507207dc98bd596d58ac Mon Sep 17 00:00:00 2001 From: Ayoub Mrini Date: Fri, 6 Jun 2025 10:56:27 +0100 Subject: [PATCH] chore(docs/kubernetes SD): add a note about Endpoints API being deprecated in kubernetes 1.33+ (#16684) * chore(docs/kubernetes SD): add a note about Endpoints API being deprecated in kubernetes 1.33+ Signed-off-by: machine424 * chore(discovery/kubernetes): add Endpoints API deprecation comment Signed-off-by: machine424 --------- Signed-off-by: machine424 --- discovery/kubernetes/endpoints.go | 1 + docs/configuration/configuration.md | 3 +++ 2 files changed, 4 insertions(+) diff --git a/discovery/kubernetes/endpoints.go b/discovery/kubernetes/endpoints.go index 14d3bc7a99..c179779277 100644 --- a/discovery/kubernetes/endpoints.go +++ b/discovery/kubernetes/endpoints.go @@ -49,6 +49,7 @@ type Endpoints struct { } // NewEndpoints returns a new endpoints discovery. +// Endpoints API is deprecated in k8s v1.33+, but we should still support it. func NewEndpoints(l *slog.Logger, eps cache.SharedIndexInformer, svc, pod, node cache.SharedInformer, eventCount *prometheus.CounterVec) *Endpoints { if l == nil { l = promslog.NewNopLogger() diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index 591223dc71..21a06748ac 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -1834,6 +1834,9 @@ The `endpoints` role discovers targets from listed endpoints of a service. For e address one target is discovered per port. If the endpoint is backed by a pod, all additional container ports of the pod, not bound to an endpoint port, are discovered as targets as well. +Note that the Endpoints API is [deprecated in Kubernetes v1.33+](https://kubernetes.io/blog/2025/04/24/endpoints-deprecation/), +it is recommended to use EndpointSlices instead and switch to the `endpointslice` role below. + Available meta labels: * `__meta_kubernetes_namespace`: The namespace of the endpoints object.