简体   繁体   English

通过 Bicep 模板使用应用程序网关入口加载项创建 AKS 集群

[英]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.

相关问题 使用自定义 su.net 为 AKS 群集启用应用程序网关入口 Controller (AGIC) 加载项 - Enable the Application Gateway Ingress Controller (AGIC) add-on for an AKS cluster using custom subnet 具有应用程序网关入口 controller 配置的 AKS - AKS with Application gateway ingress controller configuration AKS Istio Ingress 网关证书无效 - AKS Istio Ingress gateway Certificate is not valid 在多命名空间集群 AKS 中使用入口 - Using ingress in multi namespace cluster AKS 在 AKS 中通过 Ingress 访问 Prometheus 和 Grafana - Access Prometheus and Grafana via Ingress in AKS 如何在 ARM 二头肌模板中添加条件? - How to add condition in ARM Bicep template? 设置 AKS 集群 Static IP、负载均衡器和 Ingress Controller 的正确方法是什么? - What's the correct way to setup AKS cluster Static IP, Load Balancer and Ingress Controller? 使用 Cloud Code 和 GoLand 在 aks 集群中远程调试 golang 应用程序 - Remote debugging golang application in aks cluster using Cloud Code and GoLand API 的 AKS 入口 - ingress in AKS for API 将 Azure 应用程序网关连接到内部 AKS 托管负载均衡器 - Connect Azure Application Gateway with Internal AKS managed loadbalancer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM