0
votes

I'm trying to setup canary-release with Nginx ingress controller. The problem is that it doesn't keep session affinity causing every request to be served by a random service.

My canary ingress:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  namespace: canary
  name: ingress-nginx
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/canary: "true"
    nginx.ingress.kubernetes.io/canary-weight: "50"

My default ingress:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress-nginx
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/affinity: cookie

Is it currently possible to enable session affinity for canary release with Nginx ingress?

1

1 Answers

1
votes

Seems you are not the only who have this problem. There is an open issue on github with mostly the same problem: Session affinity doesn't work for canaries

Waiting for fix