Open balakrishna222111 opened 3 years ago
@balakrishna222111 I checked your cluster metadata and see that you are using kubenet
network plugin with AKS.
When using kubenet
, you also need to assign AKS route table to AppGW subnet. This route table is required to setup connectivity b/w AppGW and AKS.
Follow this document for steps on how to add the route table.
https://github.com/Azure/application-gateway-kubernetes-ingress/blob/master/docs/how-tos/networking.md#with-kubenet
If this doesn't help, please feel free to create a support ticket.
@akshaysngupta i tried below code but my aks and appgw are in 2 diff resource group so i couldn't able add route . Is there other solution ?
` aksClusterName="
nodeResourceGroup=$(az aks show -n $aksClusterName -g $aksResourceGroup -o tsv --query "nodeResourceGroup") routeTableId=$(az network route-table list -g $nodeResourceGroup --query "[].id | [0]" -o tsv)
appGatewaySubnetId=$(az network application-gateway show -n $appGatewayName -g $appGatewayResourceGroup -o tsv --query "gatewayIpConfigurations[0].subnet.id")
az network vnet subnet update \ --ids $appGatewaySubnetId --route-table $routeTableId `
@akshaysngupta is there any update ?
@akshaysngupta I have one query
@akshaysngupta I have one query
- Assume that my appgw domain is "https://appgw.com" which is working fine . whenever i send request from browser like this https://appgw.com/aks it should internally re-direct to "https://appgw.com" but in the browser we should able to see like this https://appgw.com/aks is this feature enabled or can we do like this .
@akshaysngupta i tried below code but my aks and appgw are in 2 diff resource group so i couldn't able add route . Is there other solution ?
Executed belows command
` aksClusterName="" aksResourceGroup="" appGatewayName="" appGatewayResourceGroup=""
find route table used by aks cluster
nodeResourceGroup=$(az aks show -n $aksClusterName -g $aksResourceGroup -o tsv --query "nodeResourceGroup") routeTableId=$(az network route-table list -g $nodeResourceGroup --query "[].id | [0]" -o tsv)
get the application gateway's subnet
appGatewaySubnetId=$(az network application-gateway show -n $appGatewayName -g $appGatewayResourceGroup -o tsv --query "gatewayIpConfigurations[0].subnet.id")
associate the route table to Application Gateway's subnet
az network vnet subnet update --ids $appGatewaySubnetId --route-table $routeTableId `
Output
You can also assign the route table using portal. Navigate to Application Gateway subnet and select the route table used by your AKS cluster.
@akshaysngupta the query in the doc has some issue. need to remove the "0" from it.
appGatewaySubnetId=$(az network application-gateway show -n $appGatewayName -g $appGatewayResourceGroup -o tsv --query "gatewayIpConfigurations[].subnet.id")
Have you resolved this issue
502 Bad Gateway for application gateway
Backend pools unhealthy
502 Bad Gateway
I have aks cluster to that i enabled azure appication gateway .
To Reproduce Steps to reproduce the behavior:
Ingress Controller details