0
  1. I have upgraded spring boot application from version 2.7.7 to 3.0.0.
  2. After upgrading it is working fine on local machine and able to access all the actuator health endpoints.
  3. But, after deploying the same code to Kubernetes cluster we are getting error as "Readiness probe failed. 404 not found".
  4. It is not able to call health endpoints and giving 404 error.
  5. From the pod logs we can see that application is started properly on port 8080.
  6. Please refer following image for error. enter image description here

We tried the same on local machine it is working fine. We redeployed the previous build with old springboot version it is working fine. We also tried deploying the jar in minikube environment it is working fine.We are expecting to resolve the readiness probe issue.

We are expecting to resolve this issue and start the app with springboot 3.0.0 in kubernetes environment.

  • 1
    Please post your deployment.yaml with the readinrssprobe. – Ralle Mc Black Dec 30 '22 at 10:57
  • See if this can help https://stackoverflow.com/questions/48540929/kubernetes-readiness-probe-failed-error – Nick Dec 30 '22 at 13:16
  • You can try to remove the probes from your deployment manifests. That way - the pods will not be restarted by Kubernetes and you can calmly troubleshoot them on the cluster. – Yaron Idan Dec 30 '22 at 15:12
  • Can you share your pom.xml or gradle build? – DaShaun Dec 31 '22 at 17:59
  • 1
    Hi After upgrading spring from 2.7.7 to 3.0.1 we encounter the same kind of issue only on our k8s cluster. All web endpoints (actuator and @RequestMapping) return 404 http code with the tomcat default web page as body. If we switch from tomcat to undertow all works fine. It's really strange. And we are always searching why we run into this issue. – Florent Amaridon Jan 05 '23 at 09:16
  • 2
    Hi we solved our problem by updating azure application insight java agent to 3.4.7 – Florent Amaridon Jan 10 '23 at 16:38
  • could you solve it? I'm running into a similar issue. – Ricardo Rubik Ruiz Feb 08 '23 at 23:00
  • @FlorentAmaridon this actually solved our issue too. we updated from 3.4.0 to 3.4.10(latest) and it fixed 404 issue – Jonathan Hagen Feb 24 '23 at 22:52

1 Answers1

0

Verify you actuators didn't move to a different port. In v3 there is a configuration for management port where by default the actuators are served.

https://docs.spring.io/spring-boot/docs/3.0.0/reference/htmlsingle/#actuator.endpoints.kubernetes-probes

management.server.port

Also make sure they are enabled

management.endpoint.health.probes.enabled
lance.johnsn
  • 467
  • 3
  • 9