Minikube springboot receive request and doesn't respond correctly
I can see you have .yml files to define the deployment and the service, but I can see no "Ingress". A .yml file of kind: Route
is needed in order to tell kubernetes that there should be an external url pointing to your service; a minimal Ingress resource example:
apiVersion: networking.k8s.io/v1beta1kind: Ingressmetadata: name: test-ingress annotations: nginx.ingress.kubernetes.io/rewrite-target: /spec: rules: - http: paths: - path: /testpath backend: serviceName: test servicePort: 80
**Please don't take this code literally, I'm just trying to draft some example code here and may not match perfectly your naming/data :)
Finally solved the problem.
Everything was working fine because i was launching the app from Eclipse IDE, and when packaging a .jar file, the jps files included inside the /webapp/WEB-INF/jsps folder were not included inside the .jar file and even including them throw the <resources>
tag in the pom.xml
file didn't solve the problem since the jar packaging isn't suitable for jsp file.
I fixed the problem by adding <packaging>war</packaging>
inside the pom.xml file to change the packaging method as the .jsp files feel confortable within a .war file.
Thanks to @Marc for the help.