You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

咨询Azure Application Gateway Ingress Controller是否支持TCP连接与负载均衡

Azure Application Gateway Ingress Controller(AGIC)的TCP连接支持说明

核心结论

Azure Application Gateway Ingress Controller(AGIC)支持基于TCP的连接与负载均衡,但该能力并非AGIC原生直接提供,而是依托底层Azure Application Gateway的TCP协议支持,通过特定配置实现。

具体说明

  • AGIC的核心定位是适配Kubernetes的HTTP/HTTPS Ingress资源,但底层的Azure Application Gateway(Standard_v2/WAF_v2 SKU)本身具备TCP负载均衡能力,AGIC可以通过配置将TCP流量路由到Kubernetes后端服务。
  • 配置方式分版本区别:
    • AGIC v1:可在Ingress资源中添加专属Annotation指定后端协议为TCP,示例:
      apiVersion: networking.k8s.io/v1
      kind: Ingress
      metadata:
        annotations:
          appgw.ingress.kubernetes.io/backend-protocol: "TCP"
        name: tcp-ingress
      spec:
        rules:
        - http:
            paths:
            - path: /
              pathType: Prefix
              backend:
                service:
                  name: tcp-service
                  port:
                    number: 1234
      
      同时需确保Azure Application Gateway的SKU为Standard_v2或WAF_v2,AGIC会自动同步配置对应的TCP监听与后端池。
    • AGIC v2(基于Azure Gateway API):可直接使用TCPRoute自定义资源来定义TCP流量规则,无需依赖HTTP Ingress,配置更贴合TCP场景的原生需求。

关键前提

必须使用Standard_v2或WAF_v2版本的Azure Application Gateway SKU,基础版SKU不支持TCP协议的负载均衡能力。


内容的提问来源于stack exchange,提问作者balaganesh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.05 17:07:05