-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kubernetes SD fails to discover Ingress in Kubernetes v1.22 #9199
Comments
Thank you! Are you aware about how other pieces of software deal with this? It seems that if we update the k8s library, we might not be able to support versions below 1.19 anymore. cc @paulfantom @lilic @simonpasquier @brancz @metalmatze to gather broader input. |
We could use https://pkg.go.dev/k8s.io/client-go@v0.22.0/discovery#ServerSupportsVersion to check if the server supports The latest version of the client supports both APIs https://pkg.go.dev/k8s.io/client-go@v0.22.0/kubernetes#Clientset.NetworkingV1. |
In the case of Endpoint and EndpointSlice, CoreDNS's Kubernetes plugin determines which endpoint object type to watch (Endpoint or EndpointSlice) based on the Kubernetes version and the supportability. |
AFAIK kubernetes client library should still have |
As of Prometheus v2.29.1, Kubernetes SD uses the
networking.k8s.io/v1beta1
Ingress API that is deprecated in Kubernetes v1.19. Thenetworking.k8s.io/v1beta1
Ingress API was removed in Kubernetes v1.22, so Kubernetes SD fails to discover Ingress in Kubernetes v1.22.In Kubernetes v1.22.0 and Prometheus v2.29.1, I confirm the following log.
The
networking.k8s.io/v1
Ingress API is available since Kubernetes v1.19. If Kubernetes SD only supports Kubernetes v1.19 or later, I think we can simply update to thenetworking.k8s.io/v1
Ingress API.If Kubernetes SD supports Kubernetes version less than v1.19, we need to use the different Ingress API based on the Kubernetes version.
The text was updated successfully, but these errors were encountered: