Skip to content

Commit 1a2c3ac

Browse files
Merge pull request #235551 from JackStromberg/patch-114
Updating title
2 parents 1546b10 + 03a8af1 commit 1a2c3ac

File tree

1 file changed

+29
-31
lines changed

1 file changed

+29
-31
lines changed

articles/application-gateway/ingress-controller-install-existing.md

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: greg-lindsay
66
ms.service: application-gateway
77
ms.custom: devx-track-arm-template
88
ms.topic: how-to
9-
ms.date: 11/4/2019
9+
ms.date: 04/24/2023
1010
ms.author: greglin
1111
---
1212

@@ -22,26 +22,25 @@ resources, and creates and applies Application Gateway config based on the statu
2222
- Option 1: [Set up aad-pod-identity](#set-up-aad-pod-identity) and create Azure Identity on ARMs
2323
- Option 2: [Using a Service Principal](#using-a-service-principal)
2424
- [Install Ingress Controller using Helm](#install-ingress-controller-as-a-helm-chart)
25-
- [Multi-cluster / Shared Application Gateway](#multi-cluster--shared-application-gateway): Install AGIC in an environment, where Application Gateway is
25+
- [Shared Application Gateway](#shared-application-gateway): Install AGIC in an environment, where Application Gateway is
2626
shared between one or more AKS clusters and/or other Azure components.
2727

2828
## Prerequisites
2929
This document assumes you already have the following tools and infrastructure installed:
3030
- [AKS](https://azure.microsoft.com/services/kubernetes-service/) with [Azure Container Networking Interface (CNI)](../aks/configure-azure-cni.md)
3131
- [Application Gateway v2](./tutorial-autoscale-ps.md) in the same virtual network as AKS
3232
- [AAD Pod Identity](https://github.com/Azure/aad-pod-identity) installed on your AKS cluster
33-
- [Cloud Shell](https://shell.azure.com/) is the Azure shell environment, which has `az` CLI, `kubectl`, and `helm` installed. These tools are required for the commands below.
33+
- [Cloud Shell](https://shell.azure.com/) is the Azure shell environment, which has `az` CLI, `kubectl`, and `helm` installed. These tools are required for the following commands:
3434

35-
Please __backup your Application Gateway's configuration__ before installing AGIC:
35+
**Backup your Application Gateway's configuration** before installing AGIC:
3636
1. using [Azure portal](https://portal.azure.com/) navigate to your `Application Gateway` instance
3737
2. from `Export template` click `Download`
3838

39-
The zip file you downloaded will have JSON templates, bash, and PowerShell scripts you could use to restore App
39+
The zip file you downloaded contains JSON templates, bash, and PowerShell scripts you could use to restore App
4040
Gateway should that become necessary
4141

4242
## Install Helm
43-
[Helm](../aks/kubernetes-helm.md) is a package manager for
44-
Kubernetes. We will leverage it to install the `application-gateway-kubernetes-ingress` package.
43+
[Helm](../aks/kubernetes-helm.md) is a package manager for Kubernetes, used to install the `application-gateway-kubernetes-ingress` package.
4544
Use [Cloud Shell](https://shell.azure.com/) to install Helm:
4645

4746
1. Install [Helm](../aks/kubernetes-helm.md) and run the following to add `application-gateway-kubernetes-ingress` helm package:
@@ -84,22 +83,22 @@ Next we need to create an Azure identity and give it permissions ARM.
8483
Use [Cloud Shell](https://shell.azure.com/) to run all of the following commands and create an identity:
8584

8685
1. Create an Azure identity **in the same resource group as the AKS nodes**. Picking the correct resource group is
87-
important. The resource group required in the command below is *not* the one referenced on the AKS portal pane. This is
86+
important. The resource group required in the following commands is *not* the one referenced on the AKS portal pane. This is
8887
the resource group of the `aks-agentpool` virtual machines. Typically that resource group starts with `MC_` and contains
8988
the name of your AKS. For instance: `MC_resourceGroup_aksABCD_westus`
9089

9190
```azurecli
9291
az identity create -g <agent-pool-resource-group> -n <identity-name>
9392
```
9493

95-
1. For the role assignment commands below we need to obtain `principalId` for the newly created identity:
94+
1. For the role assignment, commands we need to obtain `principalId` for the newly created identity:
9695

9796
```azurecli
9897
az identity show -g <resourcegroup> -n <identity-name>
9998
```
10099

101-
1. Give the identity `Contributor` access to your Application Gateway. For this you need the ID of the Application Gateway, which will
102-
look something like this: `/subscriptions/A/resourceGroups/B/providers/Microsoft.Network/applicationGateways/C`
100+
1. Give the identity `Contributor` access to your Application Gateway. For this you need the ID of the Application Gateway, which
101+
looks something like this: `/subscriptions/A/resourceGroups/B/providers/Microsoft.Network/applicationGateways/C`
103102

104103
Get the list of Application Gateway IDs in your subscription with: `az network application-gateway list --query '[].id'`
105104

@@ -121,7 +120,7 @@ look something like this: `/subscriptions/A/resourceGroups/B/providers/Microsoft
121120
```
122121

123122
## Using a Service Principal
124-
It is also possible to provide AGIC access to ARM via a Kubernetes secret.
123+
It's also possible to provide AGIC access to ARM via a Kubernetes secret.
125124
126125
1. Create an Active Directory Service Principal and encode with base64. The base64 encoding is required for the JSON
127126
blob to be saved to Kubernetes.
@@ -148,11 +147,11 @@ In the first few steps, we install Helm's Tiller on your Kubernetes cluster. Use
148147
helm repo update
149148
```
150149

151-
1. Download helm-config.yaml, which will configure AGIC:
150+
1. Download helm-config.yaml, which configures AGIC:
152151
```bash
153152
wget https://raw.githubusercontent.com/Azure/application-gateway-kubernetes-ingress/master/docs/examples/sample-helm-config.yaml -O helm-config.yaml
154153
```
155-
Or copy the YAML file below:
154+
Or copy the following YAML file:
156155

157156
```yaml
158157
# This file contains the essential configs for the ingress controller helm chart
@@ -161,20 +160,20 @@ In the first few steps, we install Helm's Tiller on your Kubernetes cluster. Use
161160
verbosityLevel: 3
162161
163162
################################################################################
164-
# Specify which application gateway the ingress controller will manage
163+
# Specify which application gateway the ingress controller must manage
165164
#
166165
appgw:
167166
subscriptionId: <subscriptionId>
168167
resourceGroup: <resourceGroupName>
169168
name: <applicationGatewayName>
170169
171-
# Setting appgw.shared to "true" will create an AzureIngressProhibitedTarget CRD.
170+
# Setting appgw.shared to "true" creates an AzureIngressProhibitedTarget CRD.
172171
# This prohibits AGIC from applying config for any host/path.
173172
# Use "kubectl get AzureIngressProhibitedTargets" to view and change this.
174173
shared: false
175174
176175
################################################################################
177-
# Specify which kubernetes namespace the ingress controller will watch
176+
# Specify which kubernetes namespace the ingress controller must watch
178177
# Default value is "default"
179178
# Leaving this variable out or setting it to blank or empty string would
180179
# result in Ingress Controller observing all acessible namespaces.
@@ -242,25 +241,25 @@ Refer to [this how-to guide](ingress-controller-expose-service-over-http-https.m
242241

243242

244243

245-
## Multi-cluster / Shared Application Gateway
246-
By default AGIC assumes full ownership of the Application Gateway it is linked to. AGIC version 0.8.0 and later can
244+
## Shared Application Gateway
245+
By default AGIC assumes full ownership of the Application Gateway it's linked to. AGIC version 0.8.0 and later can
247246
share a single Application Gateway with other Azure components. For instance, we could use the same Application Gateway for an app
248-
hosted on Virtual Machine Scale Set as well as an AKS cluster.
247+
hosted on Virtual Machine Scale Set and an AKS cluster.
249248
250-
Please __backup your Application Gateway's configuration__ before enabling this setting:
249+
**Backup your Application Gateway's configuration** before enabling this setting:
251250
1. using [Azure portal](https://portal.azure.com/) navigate to your `Application Gateway` instance
252251
2. from `Export template` click `Download`
253252

254-
The zip file you downloaded will have JSON templates, bash, and PowerShell scripts you could use to restore Application Gateway
253+
The zip file you downloaded contains JSON templates, bash, and PowerShell scripts you could use to restore Application Gateway
255254

256255
### Example Scenario
257256
Let's look at an imaginary Application Gateway, which manages traffic for two web sites:
258257
- `dev.contoso.com` - hosted on a new AKS, using Application Gateway and AGIC
259258
- `prod.contoso.com` - hosted on an [Azure Virtual Machine Scale Set](https://azure.microsoft.com/services/virtual-machine-scale-sets/)
260259
261-
With default settings, AGIC assumes 100% ownership of the Application Gateway it is pointed to. AGIC overwrites all of App
260+
With default settings, AGIC assumes 100% ownership of the Application Gateway it's pointed to. AGIC overwrites all of App
262261
Gateway's configuration. If we were to manually create a listener for `prod.contoso.com` (on Application Gateway), without
263-
defining it in the Kubernetes Ingress, AGIC will delete the `prod.contoso.com` config within seconds.
262+
defining it in the Kubernetes Ingress, AGIC deletes the `prod.contoso.com` config within seconds.
264263
265264
To install AGIC and also serve `prod.contoso.com` from our Virtual Machine Scale Set machines, we must constrain AGIC to configuring
266265
`dev.contoso.com` only. This is facilitated by instantiating the following
@@ -284,7 +283,7 @@ related to that hostname.
284283
285284
### Enable with new AGIC installation
286285
To limit AGIC (version 0.8.0 and later) to a subset of the Application Gateway configuration modify the `helm-config.yaml` template.
287-
Under the `appgw:` section, add `shared` key and set it to to `true`.
286+
Under the `appgw:` section, add `shared` key and set it to `true`.
288287
289288
```yaml
290289
appgw:
@@ -307,19 +306,18 @@ Apply the Helm changes:
307306
ingress-azure application-gateway-kubernetes-ingress/ingress-azure
308307
```
309308
310-
As a result your AKS will have a new instance of `AzureIngressProhibitedTarget` called `prohibit-all-targets`:
309+
As a result your AKS has a new instance of `AzureIngressProhibitedTarget` called `prohibit-all-targets`:
311310
```bash
312311
kubectl get AzureIngressProhibitedTargets prohibit-all-targets -o yaml
313312
```
314313
315314
The object `prohibit-all-targets`, as the name implies, prohibits AGIC from changing config for *any* host and path.
316-
Helm install with `appgw.shared=true` will deploy AGIC, but won't make any changes to Application Gateway.
315+
Helm install with `appgw.shared=true` deploys AGIC, but doesn't make any changes to Application Gateway.
317316

318317

319318
### Broaden permissions
320-
Since Helm with `appgw.shared=true` and the default `prohibit-all-targets` blocks AGIC from applying any config.
319+
Since Helm with `appgw.shared=true` and the default `prohibit-all-targets` blocks AGIC from applying a config, broaden AGIC permissions:
321320

322-
Broaden AGIC permissions with:
323321
1. Create a new `AzureIngressProhibitedTarget` with your specific setup:
324322
```bash
325323
cat <<EOF | kubectl apply -f -
@@ -346,7 +344,7 @@ are going to reuse the existing Application Gateway and manually configure a lis
346344
`staging.contoso.com`. But manually tweaking Application Gateway config (via
347345
[portal](https://portal.azure.com), [ARM APIs](/rest/api/resources/) or
348346
[Terraform](https://www.terraform.io/)) would conflict with AGIC's assumptions of full ownership. Shortly after we apply
349-
changes, AGIC will overwrite or delete them.
347+
changes, AGIC overwrites or deletes them.
350348
351349
We can prohibit AGIC from making changes to a subset of configuration.
352350
@@ -368,5 +366,5 @@ We can prohibit AGIC from making changes to a subset of configuration.
368366
```
369367
370368
3. Modify Application Gateway config via portal - add listeners, routing rules, backends etc. The new object we created
371-
(`manually-configured-staging-environment`) will prohibit AGIC from overwriting Application Gateway configuration related to
369+
(`manually-configured-staging-environment`) prohibits AGIC from overwriting Application Gateway configuration related to
372370
`staging.contoso.com`.

0 commit comments

Comments
 (0)