4

I'm using GCE with Kubernetes to host my rails app but the ingress reports the pod as UNHEALTHY. Below is my setup

Ingress:

spec:
  backend:
    serviceName: my-service
    servicePort: 80

Service:

spec:
  type: NodePort
  selector:
    app: my-app
  ports:
    - port: 80 
      targetPort: 3000

Depoyment

readinessProbe:
  httpGet:
    path: /health_check
    port: 3000
    initialDelaySeconds: 20
    timeoutSeconds: 5

The ingress reports the pod as UNHEALTHY and I don't see /health_check shows up in the health checks list in GCE console. It seems it's not picked up by Google load balancer controller.

Thank you very much.

ldo
  • 91
  • 1
  • 6

1 Answers1

2

It turned out the ingress didn't pick up the new path of the readiness probe that I changed earlier. The problem was solved after I recreated the ingress (which was definitely not an optimal solution).

ldo
  • 91
  • 1
  • 6
  • 1
    Hey could you explain what you changed on the readinessProbe? I am struggling to get this working, I am having issues where the pod is showing as UNHEALTHY and have a similar set up to yours. – mchaffe Jan 11 '17 at 17:46
  • I didn't change my readinessProbe. Make sure your ingress picks up the correct health check path and the pod returns response code 200 at the health check path. At the last shot, try to delete and recreate the ingress. – ldo Jan 12 '17 at 18:22
  • Thanks @Ido it was an issue with the readinessProbe not having a long enough timeoutSeconds so the healthcheck was always failing. – mchaffe Jan 12 '17 at 18:41