Closed gentisaliu closed 6 years ago
No, you need an Ingress object in order to route traffic from the outside of your cluster to the inside - it’s job is basically to load balance. It doesnt have to be NGINX, it can be the GCE Ingress controller. Please see the diagram (although it’s incorrectly showing what looks to be 2 Ingress controllers, there’s only 1 routing to all sites you may have in your cluster).
The current way to deploy WordPress with speed and security is FastCGI and NGINX. The alternative is Apache and modules which slow the PHP work down. There are two containers, one essentially running PHP (which is WordPress), and one NGINX, the web server which serves PHP to the internet. The other NGINX Ingress controller is not responsible for serving web pages.
This is the whole point - NGINX is by design a load balancer and it happens to be the fastest web server around. Additionally, having extra containers doesn’t increase overhead in the way you suppose. It’s again the whole pint of containers - to put the apps in their own isolated bins for easy, scalable deployment.
You use the nginx ingress controller and then you have an nginx container in your Wordpress deployment.
Excuse the probably novice/naive question, but why? Isn't this way too much overhead?
I realize the nginx container in the Wordpress deployment comes with FastCGI caching and the NAXSI web application firewall, but that is too much for my needs, at least for the time being.
Couldn't I simply ditch the nginx container and keep only the wordpress with php one?