[英]Create AKS Cluster with Application Gateway Ingress Add-on via Bicep Template
I was following this tutorial to setup AKS with Application Gateway Ingress Controller.我正在按照本教程使用应用程序网关入口 Controller 设置 AKS。
I am wondering what is the equivalent of this Azure CLI Command using Bicep Templates?我想知道这个使用二头肌模板的 Azure CLI 命令的等价物是什么?
az aks create -n myCluster -g myResourceGroup --network-plugin azure --enable-managed-identity -a ingress-appgw --appgw-name myApplicationGateway --appgw-subnet-cidr "10.2.0.0/16" --generate-ssh-keys
Especially as it seems that the node resource group name can only be configured using ARM/Bicep as the corresponding parameter mentioned in the FAQ seems to have vanished in the current version of the AKS Extension.特别是节点资源组名称似乎只能使用 ARM/Bicep 配置,因为FAQ中提到的相应参数似乎已在当前版本的 AKS 扩展中消失。
Update: The thing i'm mostly uncertain about is how to activate and configure the Add-On "ingress-appgw" via Template.更新:我最不确定的是如何通过模板激活和配置附加组件“ingress-appgw”。
I saw that in the export of an AKS Cluster provisioned by the above command i get this section:我看到在导出由上述命令提供的 AKS 集群时,我得到了这一部分:
"addonProfiles": {
"azurepolicy": {
"enabled": true
},
"ingressApplicationGateway": {
"enabled": true,
"config": {
"applicationGatewayName": "my-agw",
"effectiveApplicationGatewayId": "[parameters('applicationGateways_my_agw_externalid')]",
"subnetCIDR": "10.2.0.0/16"
}
}
}
If that is enough to achieve the same job i'm good but i'm not sure if the Azure CLI Command does some extra sorcery on top of that in AKS to make it all work.如果这足以完成同样的工作,我很好,但我不确定 Azure CLI 命令是否在 AKS 中做了一些额外的魔法以使其全部工作。
You can use this template as starter: https://github.com/Azure/azure-quickstart-templates/blob/91da267dce8691485d916f7315a3fe6ffcee21aa/quickstarts/microsoft.network/aks-application-gateway-ingress-controller/azuredeploy.json#L1797您可以使用此模板作为启动器: https://github.com/Azure/azure-quickstart-templates/blob/91da267dce8691485d916f7315a3fe6ffcee21aa/quickstarts/microsoft.network/aks-application-gateway-ingress-controller/azuredeploy.json#L1797
It's ARM, but you can easily transform it to Bicep, something like:它是 ARM,但您可以轻松地将其转换为 Bicep,例如:
addonProfiles: {
{
ingressApplicationGateway: {
enabled: true
config: {
applicationGatewayId: applicationGateway.id
}
}
}
Add identity if you use it.如果使用它,请添加身份。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.