通过安装Istio,您可以知道它会创建一个带有publicIP的kubernetes负载均衡器,并使用公网IP作为istio-ingress-gateway loadbalancer服务的外部IP。由于该IP不是静态的,所以我在Azure中创建了一个静态的公网IP,该公网IP和AKS在同一个ResourceGroup中,所以我找到了如下的资源组名称:
$ az aks show --resource-group myResourceGroup --name myAKSCluster --query nodeResourceGroup -o tsv
https://docs.microsoft.com/en-us/azure/aks/ingress-static-ip
我通过以下命令下载安装文件:
curl -L https://git.io/getLatestIstio | ISTIO_VERSION=1.4.2 sh -
我尝试通过以下命令重新安装istio:
$ helm template install/kubernetes/helm/istio --name istio --namespace istio-system --set grafana.enabled=true --set prometheus.enabled=true --set tracing.enabled=true --set kiali.enabled=true --set gateways.istio-ingressgateway.loadBalancerIP= my-static-public-ip | kubectl apply -f -
然而,它没有工作,仍然得到了动态IP。所以我尝试在文件istio-demo.yaml,istio-demo-auth.yaml上设置我的静态公网IP,方法是在istio-ingressgateway下添加loadbalancer IP:
spec:
type: LoadBalancer
loadBalancerIP: my-staticPublicIP
另请参阅文件: values-istio-gteways.yaml
loadBalancerIP: "mystaticPublicIP"
externalIPs: ["mystaticPublicIP"]
然后使用helm命令重新安装istio,如上所述。这一次,它添加了mystaticPublicIP作为istio-入口-网关负载均衡器服务的External_IP之一。因此,现在它同时具有动态IP和mystaticPublicIP。这似乎不是一种正确的方式。
我浏览了这个网站下的相关问题,也在谷歌上搜索了一下,但都无济于事。
我想知道有没有人知道怎么解决这个问题?
发布于 2019-11-18 21:08:09
我可以通过以下命令成功地为Istio网关服务分配静态公网IP。
helm template install/kubernetes/helm --name istio --namespace istio-system --set gateways.istio-ingressgateway.loadBalancerIP=my-static-public-ip | kubectl apply -f –
https://stackoverflow.com/questions/58659550
复制相似问题