How to configure Azure App Gateway in Istio

跟風遠走 提交于 2021-02-08 10:01:35

问题


I have an application setup on AKS (Azure Kubernetes Service) and I’m currently using Azure Application gateway as ingress resource for my application running on AKS.

Now after setting up ISTIO for my cluster the graphs are coming up fine except one part. Since the Azure APP gateway is unknown to ISTIO it is showing the resource as “unknown”. I even tried launching a virtual service and pointed it to the ingress resource but that didn’t have any effect on the graph. How shall I establish to ISTIO that it is Azure app gateway and not “unknown” resource.


回答1:


This is because Azure Application gateway is not part of Istio Mesh. Depending on how You have Your Azure Application Gateway configured You might not even get any benefits of using istio.

Getting istio to work with Azure Application Gateway is lot more complicated than it seems.

There is a Github issue that uses istio and Azure Application Gateway at the same time.

With the following statement:

You may wonder why I chose to put the ingress resource into the istio-system namespace. Im doing so because in my understanding the istio-ingress must be the endpoint for each app-gateway redirect. If I would let it redirect to the echo-server service, AGKI(application-gateway-kubernetes-ingress) would point to the ip-address of the deployed pod, which would completely disregard istios servicemesh.

So if don't already have configuration like that and You want to use Istio I suggest setting Istio Ingress Gateway as an endpoint for Your Azure Application Gateway and treat it as traffic comming from outside mesh.


Here is an explanation why Azure Application gateway is "unknown" resource.

In an this article you can find the following statement:

Ingress traffic

Istio expects traffic to go via the the Ingress Gateway. When you see ‘unknown’ traffic it can simply be the case that you use the standard Kubernetes Ingress or an OpenShift route to send traffic from the outside to Istio.

Azure Application gateway uses custom ingress controller:

Application Gateway Ingress Controller (AGIC) allows you to use Application Gateway as the ingress for an Azure Kubernetes Service (AKS) cluster.

The ingress controller runs as a pod within the AKS cluster and consumes Kubernetes Ingress Resources and converts them to an Application Gateway configuration which allows the gateway to load-balance traffic to the Kubernetes pods. The ingress controller only supports Application Gateway V2 SKU.

For more information, see Application Gateway Ingress Controller (AGIC).

According to Kiali documentation:

In some situations you can see a lot of connections from an "Unknown" node to your services in the graph, because some software external to your mesh might be periodically pinging or fetching data. This is typically the case when you setup Kubernetes liveness probes, or have some application metrics pushed or exposed to a monitoring system such as Prometheus. Perhaps you wouldn’t like to see these connections because they make the graph harder to read.


To address Your additional question:

How shall I establish to ISTIO that it is Azure app gateway and not “unknown” resource.

As far as I know there is no way to make Custom (non-istio) Ingress Gateway be part of istio mesh. Leaving Azure Application Gateway labelled as “unknown”.

Hope this helps.




回答2:


AFAIK, istio needs its own ingress gateway for apps.

Create an istio VirtualService and point it to istio's ingress gateway. The steps to do it are here and here.

Istio's ingress gateway for the app can be seen in the output of kubectl get gateway:

$ kubectl get gateway
NAME               AGE
bookinfo-gateway   32s


来源:https://stackoverflow.com/questions/60113682/how-to-configure-azure-app-gateway-in-istio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!