简体   繁体   English

Azure kubernetes - 带有内部负载均衡器的 Istio 控制器

[英]Azure kubernetes - Istio controller with Internal load balancer

I have an Azure kubernetes cluster with Istio service mesh.我有一个带有 Istio 服务网格的 Azure kubernetes 集群。

Currently the Istio controller is associated with a public load balancer IP.目前 Istio 控制器与公共负载均衡器 IP 相关联。 I want to configure the Istio with with Internal load balancer.我想使用内部负载均衡器配置 Istio。 I would be using the firewall mapping for public IP to Internal LB.我将使用防火墙映射将公共 IP 映射到内部 LB。

How do I configure the Istio controller to use the internal load balancer?如何配置 Istio 控制器以使用内部负载均衡器?

With istio 1.7 you can use the IstioOperator .在 istio 1.7 中,您可以使用IstioOperator

Create a values.yml:创建一个 values.yml:

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  profile: default #or demo
  components:
    ingressGateways:
      - name: istio-ingressgateway
        enabled: true
        k8s:
          serviceAnnotations:
            service.beta.kubernetes.io/azure-load-balancer-internal: "true"

Now install istio with the command istioctl install -f values.yml .现在使用命令istioctl install -f values.yml

The ingress gateway will now get an internal loadbalancer with an ip of the clusters vnet as external ip. Ingress 网关现在将获得一个内部负载均衡器,将集群 vnet 的 ip 作为外部 ip。 By this the cluster is only available from inside the vnet or from vnets peered with the clusters one.通过这种方式,集群只能从 vnet 内部或从与集群 1 对等的 vnet 中可用。

If you want to have a fix ip, chose an unused one (here eg 10.30.09.20) from the clusters VNet and add:如果您想要修复 ip,请从集群 VNet 中选择一个未使用的(例如 10.30.09.20)并添加:

[...]
  k8s:
    serviceAnnotations:
      service.beta.kubernetes.io/azure-load-balancer-internal: "true"
    service:
      loadBalancerIP: 10.30.09.20

You can check if an ip address is available/unused with the az cli:您可以使用 az cli 检查 IP 地址是否可用/未使用:

az network vnet check-ip-address -g MyResourceGroup -n MyVnet --ip-address 10.30.09.20

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 带有Azure Kubernetes服务的Azure内部负载均衡器不起作用 - Azure internal load balancer with Azure Kubernetes Service not working Kubernetes - 如何从“内部负载均衡器”切换到“入口控制器” - Kubernetes - how to switch from “internal Load Balancer” to “ingress controller” Azure ACS-如何使用内部负载平衡器创建入口控制器 - Azure ACS - How to create ingress controller with internal load balancer Azure内部负载平衡器IP - Azure internal load balancer IP Azure内部负载均衡器主机名? - Azure internal load balancer hostname? Grafana、Prometheus、Kiali 身份验证与 AzureAD 和 istio 内部负载均衡器 - Grafana, Prometheus, Kiali authentication with AzureAD and istio internal load balancer 通过dns名称而不是IP地址访问Azure Kubernetes-内部负载均衡器 - azure kubernetes-internal load balancer access by dns name instead of ip address Azure Kubernetes - 如何确定可用于内部负载平衡器的 DNS 名称? - Azure Kubernetes - How to determine DNS name that can be used for INTERNAL Load Balancer? 为什么部署 Kong 入口 controller 会自动在 Azure Openshift ZBA01976E98AF9BAAAD68 中提供 Azure 负载均衡器 - Why does deploying a Kong ingress controller auto provisions a Azure load balancer in Azure Openshift kubernetes 如何在 Azure 上为 istio 1.5.1 部署第二个负载均衡器 - How to deploy a second Load Balancer for istio 1.5.1 on Azure
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM