-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Spring Boot Admin on Kubernetes with DiscoveryClient for Kubernetes not showing any services #2872
Comments
Hi @tspoeri , Spring Boot Admin is supporting spring-cloud-starter-kubernetes-fabric8 and spring-cloud-starter-kubernetes-client which both support k8s service discovery without the spring-cloud-kubernetes-discoveryserver. We will have a look at spring-cloud-kubernetes-discoveryserver and spring-cloud-starter-kubernetes-discoveryclient and try to add an example there + implement missing features. At the moment we cannot provide a timeline when this will be fixed. If you can provide a pull request we would be happy to review and merge that. |
For anyone interested: Some more background information why the discoveryserver was introduced: https://spring.io/blog/2021/10/26/new-features-for-spring-cloud-kubernetes-in-spring-cloud-2021-0-0-m3 This "why/when should I use this" is missing in the docs: https://docs.spring.io/spring-cloud-kubernetes/reference/spring-cloud-kubernetes-discoveryserver.html We should support this, most of the features should come from spring cloud itself. Maybe it is really just DiscoveryClient vs. ReactiveDiscoveryClient. |
Hey |
Hi, I extended our discovery playground to contain the spring-cloud-kubernetes-discoveryserver and added a spring-boot-admin using it: https://github.com/codecentric/spring-boot-admin-discovery-playground/tree/main/kubernetes
This is working fine with reactive and servlet version of spring boot admin. However I can confirm that I saw the message saying that some reactive version of client is missing during development. But with this the app even failed to start. I guess this was related to the used versions, it has probably gone with updating dependencies to most recent version. So maybe this was fixed in spring cloud.
Another problem I can reproduce is that the list of applications does not get updated. The spring cloud kubernetes docs talk about I discovered another bug (#3034) that is relevant if you have separate management port configured (like in the example playground above). Will be included in next release, probably tomorrow. Maybe you can test with latest versions or provide an example (e.g. based on the discovery playground). |
The missing
This issue should be fixed in the next release of |
We have updated our discovery playground. The discovery client is now working as expected. New services are discovered and deleted services are removed. The important changes:
Documentation: |
Spring Boot Admin Server information
Client information
Description
I have microservices deployed on a Kubernetes cluster. The Kubernetes service registry is exposed through Spring Cloud Kubernetes Discovery Server (docker image
springcloud/spring-cloud-kubernetes-discoveryserver:3.1.0-RC1
). The clients including the SBA are using the dependencyorg.springframework.cloud:spring-cloud-starter-kubernetes-discoveryclient:3.0.3
to discover the other services.To verify that the environment works properly, I checked the health endpoints of my microservices where in the details of the "discoveryComposite" data structure all services are properly listed, except for the SBA where the list of services is empty.
With this setup, the Spring Boot Admin UI is not showing any registered services.
I think the problem is, that the
de.codecentric.boot.admin.server.cloud.discovery.InstanceDiscoveryListener
only uses instances oforg.springframework.cloud.client.discovery.DiscoveryClient
for resolving the registered services. But since SBA is using webflux libraries, an instance oforg.springframework.cloud.client.discovery.ReactiveDiscoveryClient
is created by the autoconfiguration, but SBA does not use this client to resolve services.The text was updated successfully, but these errors were encountered: