NGINX Inc Ingress Controller PHP-FPM support #2862
-
Hello, After doing some research I found that the nginx inc ingress controller does not have php-fpm fastcgi support by default. I am trying to deploy wordpress php fpm container using the nginx ingress controller in my kubernetes cluster without using any intermediate nginx container as a passthrough for the fpm. But it will need server snippets to be enabled on the ingress controller which is not advised according to the nginx.org ingress controller documentations. The documentation asks for configuring everything through annotations but I am unable to find the suitable annotations for configuring my ingress resource to support fpm and just work with the wordpress phh fpm container. Any ideas suggestion regarding this will be very helpful. How do I achieve fpm pass through configuration without the use of server snippets and by only using ingress resource annotations? Thank You. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Snippets are required to unlock some capabilities of NGINX Ingress Controller. In this case, only include the additional functionality that is necessary - only those settings in the proper context of either the Ingress or Virtual Server resource. Using the VirtualServer resource is the easiest way to introduce the snippets you mention: https://docs.nginx.com/nginx-ingress-controller/configuration/virtualserver-and-virtualserverroute-resources/#using-snippets |
Beta Was this translation helpful? Give feedback.
-
@uGiFarukh did you manage to setup php-fpm to redirect traffic to php-fpm deployment? |
Beta Was this translation helpful? Give feedback.
Snippets are required to unlock some capabilities of NGINX Ingress Controller.
The message about snippets is a cautionary warning, that if the deployment has snippets enabled that anyone with access to your K8s API and the Ingress or NGINX Ingress Controller CRDs (any K8s admin) could introduce a malicious configuration. That is all. A note to you to take proper precautions.
In this case, only include the additional functionality that is necessary - only those settings in the proper context of either the Ingress or Virtual Server resource.
Using the VirtualServer resource is the easiest way to introduce the snippets you mention: https://docs.nginx.com/nginx-ingress-controller/configuratio…