【发布时间】:2020-04-25 17:39:55
【问题描述】:
目前,我正在尝试配置一个负载均衡器,流量将从该负载均衡器发送到 Kubernetes 集群。在集群的边缘,Istio ingress 为集群的外部请求提供服务。 HAProxy 1.8 版
我可以从集群外部使用以下命令访问该服务。
curl -k -HHost:httpbin.example.com --resolve httpbin.example.com:32009:192.168.50.10 https://httpbin.example.com:32009/status/418:
以下是我的 HAProxy 配置:
前端:
frontend https
bind *:443 ssl crt /etc/ssl/certs/site.pem
mode tcp
tcp-request inspect-delay 5s
tcp-request content accept if { req_ssl_hello_type 1 }
default_backend httpbin
后端:
backend httpbin
balance roundrobin
mode tcp
acl httpbin_app req_ssl_sni -i httpbin.example.com
use-server master if httpbin_app
server master 192.168.50.10:32009 check ssl verify none
http-request set-header Host httpbin.example.com
http-request set-header X-Forwarded-For %[src]
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https if { ssl_fc }
使用 HAProxy 我总是得到 503。同样在启动过程中,HAProxy 正在说以下行:
haproxy[14260]: 后端 httpbin 没有可用的服务器!
您能帮忙找出后端的正确配置吗?
【问题讨论】:
标签: haproxy kubernetes-ingress istio