Might be a dumb question but I have a relatively simple Django App running in a docker container, also I have an Nginx container as a reverse-proxy serving my static files for the same app. Now, the question is, when I am to put the Django app inside a K8s cluster and spin up an Ingress-Nginx service, would I still need an Nginx container running inside the cluster to serve static files or I can use Ingress-Nginx for that? Thanks
Asked
Active
Viewed 854 times
0
-
2Does [serving static files from ingress-nginx](https://stackoverflow.com/questions/47624902/serving-static-files-from-ingress-nginx) answer your question? (The ingress gateway only implements forwarding rules from Kubernetes Ingress objects and you need a separate static file server.) Or, the application layout in [How to serve static contents in a kubernetes application](https://stackoverflow.com/questions/53594491/how-to-serve-static-contents-in-a-kubernetes-application)? – David Maze Feb 23 '21 at 01:27
-
so as far as I understand, I need a separate Nginx pod running in the same cluster? Because what I was trying to do up until now is running nginx and django app in the same pod and that does not work for me – Belkin Jr Feb 23 '21 at 07:20
-
Hello, If I understand correctly from the first link that David Maze included you should be using some type of static file server (like for example `nginx`) to serve your application. Please consider creating another question with [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of your app that you have issues with. – Dawid Kruk Feb 23 '21 at 16:53