Spring boot (Tomcat) service in kubernetes requires using FQDN

6/27/2018

We have Spring Boot service running in Kubernetes.
We had a problem that all requests to this service were responded with 400 without any body.
The problem was solved by calling the service with fully qualified domain name (FQDN).

In kubernetes you can call the service by service-name, or by service-name.namespace-name. All our services are in the same namespace.
All our Node.js services in kubernetes work with service-name.namespace-name requests successfully. But when we tried to call Spring Boot service we got 400 without any explanation. I saw in logs that request is received and immediately response 400.

We found that this service requires using FQDN service-name.namespace-name.svc.cluster.local.

It is requirement of Tomcat (When changed to Jetty, short domain name works).
Is it configurable?
What should be done to accept requests to service-name.namespace-name host too?

Thanks

-- Tantre
kubernetes
spring
spring-boot
tomcat
tomcat8

1 Answer

10/4/2018

It's bug in Tomcat 8.5.31
Update Tomcat to 8.5.32 fixes this.

Reference: https://github.com/spring-projects/spring-boot/issues/13205

-- Tantre
Source: StackOverflow