首页 > 解决方案 > 在 Azure AKS 中创建内部混合协议负载均衡器

问题描述

我正在尝试使用此 yaml 在 Azure AKS(已尝试 1.15.5、1.15.7 和 1.16.4)中创建一个内部混合协议负载均衡器:

---
apiVersion: v1
kind: Service
metadata:
  annotations:
    service.beta.kubernetes.io/azure-load-balancer-mixed-protocols: "true"
    service.beta.kubernetes.io/azure-load-balancer-internal: "true"
  name: consullb
spec:
  ports:
        - port: 8500
          targetPort: 8500
          name: http
          protocol: TCP
        - port: 8400
          targetPort: 8400
          name: rpc
          protocol: TCP
        - port: 8301
          targetPort: 8301
          name: serflan-tcp
          protocol: TCP
        - port: 8302
          targetPort: 8302
          name: serfwan-tcp
          protocol: TCP
        - port: 8300
          targetPort: 8300
          name: server
          protocol: TCP
        - port: 8600
          targetPort: 8600
          name: consuldns-tcp
          protocol: TCP
        - port: 8301
          targetPort: 8301
          name: serflan-udp
          protocol: UDP
        - port: 8302
          targetPort: 8302
          name: serfwan-udp
          protocol: UDP
        - port: 8600
          targetPort: 8600
          name: consuldns-udp
          protocol: UDP
  selector:
    component: consul-1582621245-consul    
  type: LoadBalancer

我收到以下错误:

cannot create an external load balancer with mix protocols

我测试了两个不同的集群,一个使用标准 SKU,一个使用基本 SKU。

我在这里缺少什么吗?或者有人可以指出我在其他方面尝试/解决问题吗?

标签: azurekubernetesazure-aksazure-load-balancer

解决方案


推荐阅读