Incorrect port used on Kubernetes
See original GitHub issueIn k8s, it looks like management.port
(as mentioned in https://codecentric.github.io/spring-boot-admin/current/#_converting_serviceinstances) is not used. I’m explicitly registering an instance of KubernetesServiceInstanceConverter
, but it doesn’t seem to do the trick.
On my application “details” page I can see that port.management
is set to 9999. I can also see that the Pod’s IP is correct and the port next to it is correct as well. The call to the health
endpoint is made using 9999. Every other call is made using port 80.
I can see that links in responses from /actuator
do not contain the port name, they look like http://my-app/actuator/env
, and I suspect this is the endpoint that is used (including the implicit port 80), and management.port
is not used.
Is there a way I can force boot-admin to always make all the requests on the right port?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:18 (4 by maintainers)
Top GitHub Comments
I actually tried with both and experienced the same problem with both.
I ended up suppressing the
EndpointDetector
with a reduced one, so that endpoints are not discovered or parsed, but provided via properties:This finally resulted in the right port being used.
This worked like a charm, thank you so much.