1
votes

I have a microservice architecture, build on Spring Cloud Netflix:

  • business-owner-service points to a Spring Boot app that runs on port 8763. Port forwarding is done, business-owner-service:80 redirects to port 8763. enter image description here
  • customer-service points to a Spring Boot app that runs on port 8766. customer-service:80 -> 8766

The architecture runs correctly if I invoke it via the Spring Cloud Zuul gateway but I wish to set up an Ingress.

My exact configuration is the following:

  • ingress enter image description here

  • ingress path configuration

enter image description here

The problem is that the ingress has all backend services on unhealthy and I don't know what I'm doing wrong. What do I must do in order to have a working Ingress?

Edit: Per comments, I tried to define readinessProbe, for customer-service pod, as follows: enter image description here

This doesn't work, and when I try to double check updated configuration, readinessProbe is not visible. I think this is a bug, but I am not sure how to check that the probe is updated or not.

Also, actuator/health GET is running through Zuul gateway: enter image description here

2
Not quire. If I add readinessProbe, I don't actually see this tag being saved. I don't get an error on saving the config, but the configuration is not viewed as saved and I don't see the backend service green. What I tried to do is to update the backend Ingress service's healthcheck. I tried with /actuator/health on port 80 (i think this is correct) and also /actuator/health:8765 (specific port for customer-service Spring Boot). Both don't work. FYI the /actuator/health check is passing if I use Zuul gateway not ingress - 2dor
defining readiness probe should work. You are using gke ingress and not nginx right? Actuator is added and enabled in the spring boot app? Are you able to curl to the /actuator/health ? - Arghya Sadhu
I've edited the question with images, readiness doesn't work and /actuator/health works - 2dor
Are you using ui or something to add readiness probe? Try to just edit the yaml and reapply it from scratch - Arghya Sadhu
I am using GKE, editing yaml from the browser interface - 2dor

2 Answers

1
votes

What ended up being the solution in my case was the health check configuration, not readinessProbe. I updated the health check that automatically were created for the ingress backend services to point to /actuator/health. This worked

0
votes

GKE ingress controller performs health check with the readiness probe defined in pod deployment. Add a readiness probe as below using spring boot actuator

spec:
  containers:
    - name: name
      readinessProbe:
        httpGet:
          port: 8080
          path: /actuator/health
        initialDelaySeconds: 10