【问题标题】:HAProxy to Istio IngressHAProxy 到 Istio 入口
【发布时间】: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


    【解决方案1】:

    终于在 HAProxy 社区的帮助下,我找到了 Istio Ingress 的正确配置。这是非常基本的。请根据您的需要更新设置。以下是配置链接。

    https://gist.github.com/emamulandalib/2a613f5308c29518fcbcdc6b3bad3900

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-09
      • 2023-01-12
      • 2020-01-26
      • 2020-05-14
      • 2021-07-12
      • 1970-01-01
      相关资源
      最近更新 更多