Component(s)
discovery.kubernetes
Add a description
Component(s)
discovery.kubernetes
loki.source.kubernetes
loki.source.kubernetes_events
What's wrong?
After upgrading to Alloy v1.13.0, which fixed the same warning for otelcol.exporter.loadbalancing (#4621), the following warning still appears repeatedly in logs:
W0327 11:39:28.871763 1 warnings.go:70] v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice
Our configuration does not use otelcol.exporter.loadbalancing. The warning must be coming from one of the other components that internally call the Kubernetes v1 Endpoints API. Based on our config, the likely sources are discovery.kubernetes (role=pod), loki.source.kubernetes, or loki.source.kubernetes_events.
The Kubernetes Endpoints API was officially deprecated in Kubernetes v1.33 (blog post). While the warning is non-breaking, it floods the logs and signals that the underlying client code should migrate to discovery.k8s.io/v1 EndpointSlice.
Steps to reproduce
- Deploy Alloy v1.13.0 on a Kubernetes v1.33+ cluster
- Configure
discovery.kubernetes with role = "pod" and loki.source.kubernetes (see config below)
- Observe the deprecation warning in Alloy logs
System information
- Kubernetes v1.33+
- Alloy v1.13.0 (Helm chart v1.4.0)
Configuration
discovery.kubernetes "pods" {
role = "pod"
selectors {
role = "pod"
field = "spec.nodeName=" + coalesce(sys.env("HOSTNAME"), constants.hostname)
}
}
discovery.relabel "pods_lithium" {
targets = discovery.kubernetes.pods.targets
rule {
source_labels = ["__meta_kubernetes_namespace"]
regex = "^lithium-.*"
action = "keep"
}
}
prometheus.scrape "pods_lithium" {
targets = discovery.relabel.pods_lithium.output
forward_to = [prometheus.remote_write.default.receiver]
honor_timestamps = false
}
loki.source.kubernetes "pods_lithium" {
targets = discovery.relabel.pods_lithium.output
forward_to = [loki.process.filter_probes.receiver]
}
loki.source.kubernetes_events "cluster_events" {
job_name = "integrations/kubernetes/eventhandler"
log_format = "logfmt"
forward_to = [loki.process.events_labels.receiver]
}
otelcol.receiver.otlp "default" {
grpc { endpoint = "0.0.0.0:4317" }
http { endpoint = "0.0.0.0:4318" }
output {
traces = [otelcol.processor.batch.default.input]
}
}
otelcol.processor.batch "default" {
output {
traces = [otelcol.exporter.otlp.default.input]
}
}
Logs
W0327 11:39:28.871763 1 warnings.go:70] v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice
Related
#4621 — Fixed the same warning for otelcol.exporter.loadbalancing in v1.13.0
#5480 — Docs update noting Endpoints deprecation for discovery.kubernetes
### Tip
<sub>React with 👍 if this issue is important to you.</sub>
Component(s)
discovery.kubernetes
Add a description
Component(s)
discovery.kubernetesloki.source.kubernetesloki.source.kubernetes_eventsWhat's wrong?
After upgrading to Alloy v1.13.0, which fixed the same warning for
otelcol.exporter.loadbalancing(#4621), the following warning still appears repeatedly in logs:W0327 11:39:28.871763 1 warnings.go:70] v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice
Our configuration does not use
otelcol.exporter.loadbalancing. The warning must be coming from one of the other components that internally call the Kubernetesv1 EndpointsAPI. Based on our config, the likely sources arediscovery.kubernetes(role=pod),loki.source.kubernetes, orloki.source.kubernetes_events.The Kubernetes Endpoints API was officially deprecated in Kubernetes v1.33 (blog post). While the warning is non-breaking, it floods the logs and signals that the underlying client code should migrate to
discovery.k8s.io/v1 EndpointSlice.Steps to reproduce
discovery.kuberneteswithrole = "pod"andloki.source.kubernetes(see config below)System information
Configuration
discovery.kubernetes "pods" { role = "pod" selectors { role = "pod" field = "spec.nodeName=" + coalesce(sys.env("HOSTNAME"), constants.hostname) } } discovery.relabel "pods_lithium" { targets = discovery.kubernetes.pods.targets rule { source_labels = ["__meta_kubernetes_namespace"] regex = "^lithium-.*" action = "keep" } } prometheus.scrape "pods_lithium" { targets = discovery.relabel.pods_lithium.output forward_to = [prometheus.remote_write.default.receiver] honor_timestamps = false } loki.source.kubernetes "pods_lithium" { targets = discovery.relabel.pods_lithium.output forward_to = [loki.process.filter_probes.receiver] } loki.source.kubernetes_events "cluster_events" { job_name = "integrations/kubernetes/eventhandler" log_format = "logfmt" forward_to = [loki.process.events_labels.receiver] } otelcol.receiver.otlp "default" { grpc { endpoint = "0.0.0.0:4317" } http { endpoint = "0.0.0.0:4318" } output { traces = [otelcol.processor.batch.default.input] } } otelcol.processor.batch "default" { output { traces = [otelcol.exporter.otlp.default.input] } } Logs W0327 11:39:28.871763 1 warnings.go:70] v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice Related #4621 — Fixed the same warning for otelcol.exporter.loadbalancing in v1.13.0 #5480 — Docs update noting Endpoints deprecation for discovery.kubernetes ### Tip <sub>React with 👍 if this issue is important to you.</sub>