因为我使用WebSocket,所以我需要TCP平衡。
nginx-ingress服务注释:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled: "true"
service.beta.kubernetes.io/aws-load-balancer-connection-draining-timeout: "60"
service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "3600"
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: '*'
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:iam::<certificate arn>
service.beta.kubernetes.io/aws-load-balancer-ssl-negotiation-policy: ELBSecurityPolicy-TLS-1-2-2017-01
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: https
我想将所有http重定向到https。但是,如果我在注释中设置 nginx.ingress.kubernetes.io/force-ssl-redirect:“ true” ,我将获得重定向循环(TOO_MANY_REDIRECTS)。
如何使用启用的代理协议将客户端重定向到HTTPS?