Skip to content

Commit 6b96d1d

Browse files
authored
Merge pull request #204508 from halkazwini/appgw-green
Application Gateway: Tutorial Freshness Review: Enable the Ingress Controller add-on for a new AKS cluster with a new Application Gateway instance
2 parents f7a9242 + cb316b0 commit 6b96d1d

File tree

1 file changed

+36
-25
lines changed

1 file changed

+36
-25
lines changed
Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
---
2-
title: 'Tutorial: Enable the Ingress Controller add-on for a new AKS cluster with a new Azure Application Gateway'
3-
description: Use this tutorial to learn how to enable the Ingress Controller add-on for your new AKS cluster with a new Application Gateway instance.
2+
title: 'Tutorial: Enable the Ingress Controller add-on for a new AKS cluster with a new Azure application gateway'
3+
description: Use this tutorial to learn how to enable the Ingress Controller add-on for your new AKS cluster with a new application gateway instance.
44
services: application-gateway
55
author: caya
66
ms.service: application-gateway
77
ms.topic: tutorial
8-
ms.date: 03/02/2021
8+
ms.date: 07/12/2022
99
ms.author: caya
10+
ms.custom: template-tutorial #Required; leave this attribute/value as-is.
1011
---
1112

12-
# Tutorial: Enable the Ingress Controller add-on for a new AKS cluster with a new Application Gateway instance
13+
# Tutorial: Enable the ingress controller add-on for a new AKS cluster with a new application gateway instance
1314

14-
You can use the Azure CLI to enable the [Application Gateway Ingress Controller (AGIC)](ingress-controller-overview.md) add-on for a new [Azure Kubernetes Services (AKS)](https://azure.microsoft.com/services/kubernetes-service/) cluster.
15+
You can use the Azure CLI to enable the [application gateway ingress controller (AGIC)](ingress-controller-overview.md) add-on for a new [Azure Kubernetes Services (AKS)](https://azure.microsoft.com/services/kubernetes-service/) cluster.
1516

16-
In this tutorial, you'll create an AKS cluster with the AGIC add-on enabled. Creating the cluster will automatically create an Azure Application Gateway instance to use. You'll then deploy a sample application that will use the add-on to expose the application through Application Gateway.
17+
In this tutorial, you'll create an AKS cluster with the AGIC add-on enabled. Creating the cluster will automatically create an Azure application gateway instance to use. You'll then deploy a sample application that will use the add-on to expose the application through application gateway.
1718

1819
The add-on provides a much faster way to deploy AGIC for your AKS cluster than [previously through Helm](ingress-controller-overview.md#difference-between-helm-deployment-and-aks-add-on). It also offers a fully managed experience.
1920

@@ -23,83 +24,93 @@ In this tutorial, you learn how to:
2324
> * Create a resource group.
2425
> * Create a new AKS cluster with the AGIC add-on enabled.
2526
> * Deploy a sample application by using AGIC for ingress on the AKS cluster.
26-
> * Check that the application is reachable through Application Gateway.
27+
> * Check that the application is reachable through application gateway.
2728
2829
[!INCLUDE [quickstarts-free-trial-note](../../includes/quickstarts-free-trial-note.md)]
2930

3031
[!INCLUDE [azure-cli-prepare-your-environment.md](../../includes/azure-cli-prepare-your-environment.md)]
3132

3233
## Create a resource group
3334

34-
In Azure, you allocate related resources to a resource group. Create a resource group by using [az group create](/cli/azure/group#az-group-create). The following example creates a resource group named *myResourceGroup* in the *canadacentral* location (region):
35+
In Azure, you allocate related resources to a resource group. Create a resource group by using [az group create](/cli/azure/group#az-group-create). The following example creates a resource group named **myResourceGroup** in the **East US** location (region):
3536

3637
```azurecli-interactive
37-
az group create --name myResourceGroup --location canadacentral
38+
az group create --name myResourceGroup --location eastus
3839
```
3940

4041
## Deploy an AKS cluster with the add-on enabled
4142

42-
You'll now deploy a new AKS cluster with the AGIC add-on enabled. If you don't provide an existing Application Gateway instance to use in this process, we'll automatically create and set up a new Application Gateway instance to serve traffic to the AKS cluster.
43+
You'll now deploy a new AKS cluster with the AGIC add-on enabled. If you don't provide an existing application gateway instance to use in this process, you'll automatically create and set up a new application gateway instance to serve traffic to the AKS cluster.
4344

4445
> [!NOTE]
45-
> The Application Gateway Ingress Controller add-on supports *only* Application Gateway v2 SKUs (Standard and WAF), and *not* the Application Gateway v1 SKUs. When you're deploying a new Application Gateway instance through the AGIC add-on, you can deploy only an Application Gateway Standard_v2 SKU. If you want to enable the add-on for an Application Gateway WAF_v2 SKU, use either of these methods:
46+
> The application gateway ingress controller add-on supports *only* application gateway v2 SKUs (Standard and WAF), and *not* the application gateway v1 SKUs. When you're deploying a new application gateway instance through the AGIC add-on, you can deploy only an application gateway Standard_v2 SKU. If you want to enable the add-on for an application gateway WAF_v2 SKU, use either of these methods:
4647
>
47-
> - Enable WAF on Application Gateway through the portal.
48-
> - Create the WAF_v2 Application Gateway instance first, and then follow instructions on how to [enable the AGIC add-on with an existing AKS cluster and existing Application Gateway instance](tutorial-ingress-controller-add-on-existing.md).
48+
> - Enable WAF on application gateway through the portal.
49+
> - Create the WAF_v2 application gateway instance first, and then follow instructions on how to [enable the AGIC add-on with an existing AKS cluster and existing application gateway instance](tutorial-ingress-controller-add-on-existing.md).
4950
50-
In the following example, you'll deploy a new AKS cluster named *myCluster* by using [Azure CNI](../aks/concepts-network.md#azure-cni-advanced-networking) and [managed identities](../aks/use-managed-identity.md). The AGIC add-on will be enabled in the resource group that you created, *myResourceGroup*.
51+
In the following example, you'll deploy a new AKS cluster named *myCluster* by using [Azure CNI](../aks/concepts-network.md#azure-cni-advanced-networking) and [managed identities](../aks/use-managed-identity.md). The AGIC add-on will be enabled in the resource group that you created, **myResourceGroup**.
5152

52-
Deploying a new AKS cluster with the AGIC add-on enabled without specifying an existing Application Gateway instance will mean an automatic creation of a Standard_v2 SKU Application Gateway instance. So, you'll also specify the name and subnet address space of the Application Gateway instance. The name of the Application Gateway instance will be *myApplicationGateway*, and the subnet address space we're using is 10.2.0.0/16.
53+
Deploying a new AKS cluster with the AGIC add-on enabled without specifying an existing application gateway instance will mean an automatic creation of a Standard_v2 SKU application gateway instance. So, you'll also specify the name and subnet address space of the application gateway instance. The name of the application gateway instance will be **myApplicationGateway**, and the subnet address space will be **10.225.0.0/16**.
5354

5455
```azurecli-interactive
55-
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
56+
az aks create -n myCluster -g myResourceGroup --network-plugin azure --enable-managed-identity -a ingress-appgw --appgw-name myApplicationGateway --appgw-subnet-cidr "10.225.0.0/16" --generate-ssh-keys
5657
```
5758

58-
To configure additional parameters for the `az aks create` command, see [these references](/cli/azure/aks#az-aks-create).
59+
To configure more parameters for the above command, got to [az aks create](/cli/azure/aks#az-aks-create).
5960

6061
> [!NOTE]
61-
> The AKS cluster that you created will appear in the resource group that you created, *myResourceGroup*. However, the automatically created Application Gateway instance will be in the node resource group, where the agent pools are. The node resource group by is named *MC_resource-group-name_cluster-name_location* by default, but can be modified.
62+
> The AKS cluster that you created will appear in the resource group that you created, **myResourceGroup**. However, the automatically created application gateway instance will be in the node resource group, where the agent pools are. The node resource group is named **MC_resource-group-name_cluster-name_location** by default, but can be modified.
6263
6364
## Deploy a sample application by using AGIC
6465

65-
You'll now deploy a sample application to the AKS cluster that you created. The application will use the AGIC add-on for ingress and connect the Application Gateway instance to the AKS cluster.
66+
You'll now deploy a sample application to the AKS cluster that you created. The application will use the AGIC add-on for ingress and connect the application gateway instance to the AKS cluster.
6667

6768
First, get credentials to the AKS cluster by running the `az aks get-credentials` command:
6869

6970
```azurecli-interactive
7071
az aks get-credentials -n myCluster -g myResourceGroup
7172
```
7273

73-
Now that you have credentials, run the following command to set up a sample application that uses AGIC for ingress to the cluster. AGIC will update the Application Gateway instance that you set up earlier with corresponding routing rules to the new sample application that you deployed.
74+
Now that you have credentials, run the following command to set up a sample application that uses AGIC for ingress to the cluster. AGIC will update the application gateway instance that you set up earlier with corresponding routing rules to the sample application you're deploying.
7475

7576
```azurecli-interactive
7677
kubectl apply -f https://raw.githubusercontent.com/Azure/application-gateway-kubernetes-ingress/master/docs/examples/aspnetapp.yaml
7778
```
7879

7980
## Check that the application is reachable
8081

81-
Now that the Application Gateway instance is set up to serve traffic to the AKS cluster, let's verify that your application is reachable. First, get the IP address of the ingress:
82+
Now that the application gateway instance is set up to serve traffic to the AKS cluster, let's verify that your application is reachable. First, get the IP address of the ingress:
8283

8384
```azurecli-interactive
8485
kubectl get ingress
8586
```
8687

8788
Check that the sample application that you created is running by either:
8889

89-
- Visiting the IP address of the Application Gateway instance that you got from running the preceding command.
90+
- Visiting the IP address of the application gateway instance that you got from running the preceding command.
9091
- Using `curl`.
9192

92-
Application Gateway might take a minute to get the update. If Application Gateway is still in an **Updating** state on the portal, let it finish before you try to reach the IP address.
93+
Application gateway might take a minute to get the update. If application gateway is still in an **Updating** state on the portal, let it finish before you try to reach the IP address.
9394

9495
## Clean up resources
9596

96-
When you no longer need them, remove the resource group, the Application Gateway instance, and all related resources:
97+
When you no longer need them, delete all resources created in this tutorial by deleting **myResourceGroup** and **MC_myResourceGroup_myCluster_eastus** resource groups:
9798

9899
```azurecli-interactive
99100
az group delete --name myResourceGroup
101+
az group delete --name MC_myResourceGroup_myCluster_eastus
100102
```
101103

102104
## Next steps
103105

106+
In this tutorial, you:
107+
108+
- Created new AKS cluster with the AGIC add-on enabled
109+
- Deployed a sample application by using AGIC for ingress on the AKS cluster
110+
111+
To learn more about AGIC, see [What is Application Gateway Ingress Controller?](ingress-controller-overview.md) and [Disable and re-enable AGIC add-on for your AKS cluster](ingress-controller-disable-addon.md)
112+
113+
To learn how to enable application gateway ingress controller add-on for an existing AKS cluster with an existing application gateway, advance to the next tutorial.
114+
104115
> [!div class="nextstepaction"]
105-
> [Learn about disabling the AGIC add-on](./ingress-controller-disable-addon.md)
116+
> [Enable AGIC for existing AKS and application gateway](tutorial-ingress-controller-add-on-existing.md)

0 commit comments

Comments
 (0)