-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Nginx Ingress Controller - Routing to service #829
Comments
@nottix to delegate the load balancing to nginx and be able to use sticky session ( |
Using this way is it possible that Pod (that was deleted and recreated) IP inside Nginx is not synched with the new current Pod IP? |
@nottix please add
I never saw this behavior. Please change the |
Ok @aledbf , i'm running a local instance of controller to monitoring the differences. To enable sticky session on nginx is required ip_hash parameter or i'm wrong? In the nginx.tmpl i see least_conn. |
@nottix ip_hash is not a "real" sticky session. This functionality is only available in the comercial version of nginx. That's the reason why I'm adding the nginx-sticky-module-ng module in #825 |
Ah ok, thank you @aledbf |
Last question: if i want to use sticky session now, i should wait for integration of nginx-sticky-module-ng ? |
@aledbf it would be great! Thanks. I have to go on production with big portal that expects 30000 visitors weekly :-) |
We actually place pod IP on upstream instead of service IP. I found that Kubernetes 1.1 was introduced "Proxy-mode: iptables" on service, so why don't leverage on service layer for dispatching requests to pods instead of replicate load balance feature with nginx upstream? |
because is not possible to specify things like how to balance or use sticky sessions Please check the new version |
Please check this answer #1140 (comment) |
Thank you |
Can someone link how to enable sticky sessions for the nginx ingress controller? Having some trouble finding it. |
Hi, I'm looking to enable sticky sessions too. I tried to add this configmap but it's didn't affect the ingress controller (also with manual pod kill):
Edit : i found the solution, you need to add this argument in the ingress controller :
|
@dgoujard if you figure it out, please post back! |
@jsindy you need to specify the configmap ( |
Perfect! thanks |
Hi @aledbf, could you please elaborate what you mean by your statement about ip_hash below?
It looks like ip_hash is available in NGINX and not just in NGINX Plus, the commercial version, based on this article. Would applying the ip_hash upstream directive work? I'm looking for Client IP affinity without the use of cookies. |
Hi,
i found that "Nginx Ingress Controller" routes all traffic directly to pod bypassing services, why?
@aledbf
Thank you.
The text was updated successfully, but these errors were encountered: