serving static files from ingress-nginx

前端 未结 1 1099
感情败类
感情败类 2021-01-17 10:23

I have a express web server with static files. Let\'s call this my express-deployment.

I\'d like to use my ingress-nginx to s

相关标签:
1条回答
  • 2021-01-17 11:04

    In theory, you could have a PV in in RWX mode mounted to both express and ingress and provide custom config to the nginx-ingress pods, but that should be avoided. Ingress Controller has one responsibility - implement Ingress rules defined in your cluster. To serve static content you should have a pod that does that, which indeed means ie. running second nginx in your stack. The thing is, that you should treat your ingress controller as part of the infrastructure providing generic cluster functionality, and serving static files from some place (or container if they are versioned/built as docker images) is de facto part of your application.

    0 讨论(0)
提交回复
热议问题