Session Affinity in kubernetes based on Client session not on Client IP Session Affinity in kubernetes based on Client session not on Client IP kubernetes kubernetes

Session Affinity in kubernetes based on Client session not on Client IP


Ingress Session Affinity

The support for Session Affinity on Ingress request depends on the implementation of the Ingress Controller that you are using.

E.g. the of Kubernetes community provided Nginx Ingress Controller does support some session affinity based on cookies.

In the example above, you can see that the response contains a Set-Cookie header with the settings we have defined. This cookie is created by NGINX, it contains a randomly generated key corresponding to the upstream used for that request (selected using consistent hashing) and has an Expires directive. If the user changes this cookie, NGINX creates a new one and redirects the user to another upstream.