Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup nginx as reverse proxy for rest microservice in kubernetes?

I have a rest microservice and would like to setup nginx as a reverse proxy for it. I am little confused about which approach to follow:

  1. Run nginx in each pod where application code is running.
  2. Run nginx in separate pods and redirect http requests to application code running in separate pods.

Can someone explain which one is better

like image 939
madcolonel10 Avatar asked Nov 30 '25 11:11

madcolonel10


1 Answers

In my opinion, running nginx in a separate pod is a better option because that way you can scale up and down application separately from a proxy. Usually, we use one container with proxy and few with API.

like image 151
kamillitw Avatar answered Dec 02 '25 04:12

kamillitw



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!