Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
356 views
in Technique[技术] by (71.8m points)

Azure application gateway with AKS Kube-Proxy

I have a AKS Cluster and some microservice with Nodeport available in it.

User -> Application Gateway -> Backend Pool -> Nodeport of microservice -> service

However, i have idea to use Application Gateway with Virtual machine scale sets from AKS Node Pool.

When i add backend (VMSS) of AKS Nodepool in application gateway

{
    "status": "Failed",
    "error": {
        "code": "LinkedAuthorizationFailed",
        "message": "The client has permission to perform action 'Microsoft.Compute/galleries/images/versions/read' on scope '/subscriptions/aa51d057-842e..../resourcegroups/MC_loadbalancer_aaa-aks-1_southeastasia/providers/Microsoft.Compute/virtualMachineScaleSets/aks-syspool-13675031-vmss', however the current tenant '1393b73d-faec-...' is not authorized to access linked subscription '911a5e88-712a-...'."
    }
}

But if i create manual VMSS and add it to application gateway, it's fine. But when i add VMSS Node Pool by AKS Cluster, it's error like above.

The error is weird. It's like my Tenant ID doesn't have subscription to 911a5e88....

Is it really possible to connect application gateway to AKS Node Pool as backend-pool ?

question from:https://stackoverflow.com/questions/65898302/azure-application-gateway-with-aks-kube-proxy

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I am in the exact same situation.

The fix was inspired from here: https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-upgrade-scale-set#update-the-load-balancer-for-your-scale-set It seems like in azure you can go also the other way around and configure your VMSS to a BackendPool, option which seems to be available only from the CLI.

az vmss update --resource-group myResourceGroup --name myScaleSet --add virtualMachineProfile.networkProfile.networkInterfaceConfigurations[0].ipConfigurations[0].ApplicationGatewayBackendAddressPools '{"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{applicationGatewayBackendPoolName}"}'

I don't know why the current reply was accepted since it just providing an workaround; you must be able to add a VMSS to your AppGW backend pool. It's either a bug in Azure or an undocumented case with the latest upgrades.

You should never use IP or FQDN with a VMSS, it's not good practice.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...