Why does K3s warn that the v1 Endpoints API is deprecated?

0
2
Asked By MellowOrbit42 On

I'm running a brand-new K3s installation based on the official setup instructions. When I run `sudo kubectl get svc,endpoints -n kube-system`, Kubernetes prints: "Warning: v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice." Is this something I need to upgrade or fix? I'm also seeing connection refused when trying to access hosts defined in the services, and the Cattle system components do not show external IP addresses.

2 Answers

Answered By PixelHarbor19 On

Use EndpointSlices when inspecting service backends: `sudo kubectl get svc,endpointslices -n kube-system`. To see the actual addresses and ports, run `kubectl describe svc -n kube-system` and `kubectl get endpointslice -n kube-system -o wide`. The absence of an external IP is expected for services that are ClusterIP-only; it is separate from the deprecation warning.

MellowOrbit42 -

What should I check if connecting to a host gives “connection refused”?

PixelHarbor19 -

First check whether the service has ready endpoints, whether its target pods are running and listening on the expected port, and whether the service port and targetPort match. Also verify whether you’re connecting from inside or outside the cluster; a ClusterIP is generally reachable only from within the cluster unless you use NodePort, LoadBalancer, or an ingress.

Answered By QuietMaple7 On

This is only a deprecation warning, not an indication that your K3s installation is broken. The older core/v1 Endpoints API is being phased out in favor of EndpointSlice. Existing services can continue working for now, but scripts and commands you maintain should eventually switch to `discovery.k8s.io/v1` EndpointSlice objects.

MellowOrbit42 -

So I don’t need to upgrade K3s just because of this warning?

QuietMaple7 -

Correct. You can upgrade normally when a newer K3s release is available, but the warning itself does not require an immediate upgrade.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.