配置文件示例

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress-wordpress
  namespace: kube-example
  annotations:
    nginx.ingress.kubernetes.io/affinity: "cookie"
    nginx.ingress.kubernetes.io/session-cookie-name: "route"
    nginx.ingress.kubernetes.io/session-cookie-expires: "172800"
    nginx.ingress.kubernetes.io/session-cookie-max-age: "172800"
spec:
  rules:
  - host: www.elephdev.com  #将域名与node IP 绑定写入访问节点hosts文件
    http:
      paths:
      - path:
        backend:
          serviceName: wordpress
          servicePort: 80

支持以下配置项

  • nginx.ingress.kubernetes.io/affinity

  • nginx.ingress.kubernetes.io/affinity-mode

  • nginx.ingress.kubernetes.io/session-cookie-name

  • nginx.ingress.kubernetes.io/session-cookie-path

  • nginx.ingress.kubernetes.io/session-cookie-samesite

  • nginx.ingress.kubernetes.io/session-cookie-conditional-samesite-none

  • nginx.ingress.kubernetes.io/session-cookie-max-age

  • nginx.ingress.kubernetes.io/session-cookie-expires

  • nginx.ingress.kubernetes.io/session-cookie-change-on-failure

点赞(1)

评论列表 共有 0 评论

暂无评论