I have a deployment which comprises 2 pods with a webapp in them. Nginx ingress controller is installed to expose those 2 pods using tls-passthrough. I have tried to use annotations to setup sticky-sessions but to no avail. No cookie is present in the headers hence no stickyness. What could I do to make it work ? Many thanks for your wise answers.
The Ingress I have created :
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
annotations:
# nginx.ingress.kubernetes.io/secure-backends: "true"
# nginx.ingress.kubernetes.io/ssl-passthrough: "true"
# nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
# nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/affinity: "cookie"
nginx.ingress.kubernetes.io/affinity-mode: "persistent"
nginx.ingress.kubernetes.io/session-cookie-name: "wabam"
nginx.ingress.kubernetes.io/session-cookie-expires: "172800"
nginx.ingress.kubernetes.io/session-cookie-max-age: "172800"
namespace: default
spec:
rules:
- host: wabam.moulip.lan
http:
paths:
- backend:
serviceName: wabam-ingress-svc
servicePort: 443
path: /
ssl-passthrough
then you cannot modify the request/response (by definition). – zerkmsssl-passthrough
. Therefore, I don't think this would work like you described. – Wytrzymały Wiktor