gajus / lightship

Abstracts readiness, liveness and startup checks and graceful shutdown of Node.js services running in Kubernetes.
Other
517 stars 33 forks source link

502 Bad gateway #10

Closed igorjnz closed 5 years ago

igorjnz commented 5 years ago

I've got a WFE running and I'm implementing this in Kubernetes with the standard probe configuration, however as soon as lightship is added I receive a 502 when attempting to access my site. Container logs say server is ready and started on port 80

Am I missing something??

Thanks!

gajus commented 5 years ago

This sounds like your readiness/ liveness checks are failing.

I would start by checking kubectl describe pod/... to confirm this.

If that is the case, then SSH into docker container and check if the liveness probe is exposed and functioning as you expect it to.

If that is the case, then check to make sure that Pod manifest is configured correctly.

igorjnz commented 5 years ago

So I've got Ports: 80/TCP, 9000/TCP exposed on my pod.. Liveness: http-get http://:9000/live delay=10s timeout=1s period=30s #success=1 #failure=3 Readiness: http-get http://:9000/ready delay=5s timeout=1s period=5s #success=1 #failure=1

However this is in the event for the pod connection refused get http://10.244.0.207:9000/ready. Am I missing some other configuration?

gajus commented 5 years ago

What is the output of curl -v 127.0.0.1:9000 when you ssh into the container?

If you get the expected output, then the issue is with your Kubernetes manifest.