본문 바로가기
OS/kubernetes

🥰 nginx ingress Configure a sticky session

by Knowledge Store In Hyunsoft 2024. 5. 20.

 

 

 

  • nginx ingress Configure a sticky session
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: sticky-session-test
  annotations:
    nginx.ingress.kubernetes.io/affinity: "cookie"
    nginx.ingress.kubernetes.io/session-cookie-name: "route"
    nginx.ingress.kubernetes.io/session-cookie-max-age: "172800"

spec:
  rules:
  - host: stickyingress.example.com
    http:
      paths:
      - backend:
          serviceName: http-svc
          servicePort: 80
        path: /
728x90

댓글