简体   繁体   中英

Debugging node.js microservices behind nginx reverse proxy

I've been struggling for a few days to get remote debugging of node.js working on Google Container Engine via Kubernetes. The main issue comes from the fact that the services that I want to debug are behind an nginx reverse proxy.

So my question is, first of all, is it possible to remotely debug upstream services that lie behind a reverse proxy? And if so, how?

If I could get debugging working through reverse proxy on localhost I'm fairly confident that I could get it working on gke through Kubernetes too.

I'd be happy to supply you with any information you need, like configs etc.

Thanks!

I gave up trying to get debugging working through the nginx reverse proxy and instead just settled with debugging single kubernetes pods (docker droplets) through port-forwarding from the specific pod to my localhost, and then just attach the debugger to localhost:PORT

Here's the command and documentation in case someone needs it:

kubectl port-forward POD-NAME PORT

And you get the POD-NAME by running the following command:

kubectl get pods

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM