![](/img/trans.png)
[英]Create AKS Cluster with Application Gateway Ingress Add-on via Bicep Template
[英]Enable the Application Gateway Ingress Controller (AGIC) add-on for an AKS cluster using custom subnet
我按照本教程https://learn.microsoft.com/en-us/azure/application-gateway/tutorial-ingress-controller-add-on-new為 AKS 群集安裝 AGIC。
作為文檔,默認的 .net 是 10.0.0.0/8,su.net 是 10.240.0.0/16。 我不想使用 /8 和 /16,所以我將 .net 更改為 /20,將 su.net 更改為 /23。
運行此命令后,我看到了 k8s 集群,但沒有 App Gateway。
az aks create -n test-k8s -g "infra-k8s-test" --network-plugin azure --enable-managed-identity -a ingress-appgw --appgw-name test-appgw --appgw-subnet-cidr "10.0.12.0/23" --generate-ssh-keys --location southcentralus --service-cidr "10.0.4.0/23" --dns-service-ip 10.0.4.10 --vnet-subnet-id "/subscriptions/efxxxxc9/resourceGroups/infra-test-k8s/providers/Microsoft.Network/virtualNetworks/infra-k8s-test-vnet/subnets/infra-k8s-test-subnet"
Waiting for AAD role to propagate[################################ ] 90.0000%Could not create a role assignment for virtual network:
subscriptions/efxxxxc9/resourceGroups/infra-k8s-test/providers/Microsoft.Network/virtualNetworks/infra-k8s-test-vnet specified in ingressApplicationGateway addon. Are you an Owner on this subscription?
我看到 Github 上有很多與使用 AKS 自定義 su.net 相關的問題。 我們有針對此設置的解決方案嗎?
使用以下命令為現有 su.net 設置 su.net ID 變量:
APPGW_SUBNET_ID=$(az network vnet subnet show -g $VNET_RG --vnet-name $VNET_NAME -n $SUBNET_NAME --query id -o tsv --subscription $SUBSCRIPTION)
將--appgw-su.net-cidr
替換為以下命令:
--appgw-subnet-id $APPGW_SUBNET_ID
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.