Skip to content

Commit dfb978d

Browse files
committed
Freshness pass updates
1 parent a735d2d commit dfb978d

File tree

1 file changed

+35
-36
lines changed

1 file changed

+35
-36
lines changed

articles/aks/ingress-tls.md

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -88,82 +88,81 @@ Import-AzContainerRegistryImage -ResourceGroupName $ResourceGroup -RegistryName
8888
8989
## Ingress controller configuration options
9090

91-
An NGINX ingress controller is created with a new public IP address assignment by default. This public IP address is only static for the lifespan of the ingress controller. If you delete the ingress controller, the public IP address assignment will be lost. If you create another ingress controller, a new public IP address will be assigned.
91+
You can configure your NGINX ingress controller using either a static public IP address or a dynamic public IP address. If you're using a custom domain, you need to add an A record to your DNS zone. If you're not using a custom domain, you can configure a fully qualified domain name (FQDN) for the ingress controller IP address.
9292

93-
You can configure your ingress controller using one of the following methods:
93+
### Create a static or dynamic public IP address
9494

95-
* A dynamic public IP address.
96-
* A static public IP address.
95+
#### Use a static public IP address
9796

98-
## Use a static public IP address
97+
You can configure your ingress controller with a static public IP address. The static public IP address remains if you delete your ingress controller. The IP address does *not* remain if you delete your AKS cluster.
9998

100-
A common configuration requirement is to provide the NGINX ingress controller an existing static public IP address. The static public IP address remains if the ingress controller is deleted.
101-
102-
Follow the commands to create an IP address that will be deleted if you delete your AKS cluster.
99+
When you upgrade your ingress controller, you must pass a parameter to the Helm release to ensure the ingress controller service is made aware of the load balancer that will be allocated to it. For the HTTPS certificates to work correctly, you use a DNS label to configure an FQDN for the ingress controller IP address.
103100

104101
### [Azure CLI](#tab/azure-cli)
105102

106-
Get the resource group name of the AKS cluster with the [`az aks show`][az-aks-show] command.
103+
1. Get the resource group name of the AKS cluster with the [`az aks show`][az-aks-show] command.
107104

108105
```azurecli-interactive
109106
az aks show --resource-group myResourceGroup --name myAKSCluster --query nodeResourceGroup -o tsv
110107
```
111108

112-
Next, create a public IP address with the *static* allocation method using the [`az network public-ip create`][az-network-public-ip-create] command. The following example creates a public IP address named *myAKSPublicIP* in the AKS cluster resource group obtained in the previous step.
109+
2. Create a public IP address with the *static* allocation method using the [`az network public-ip create`][az-network-public-ip-create] command. The following example creates a public IP address named *myAKSPublicIP* in the AKS cluster resource group obtained in the previous step.
113110

114111
```azurecli-interactive
115112
az network public-ip create --resource-group MC_myResourceGroup_myAKSCluster_eastus --name myAKSPublicIP --sku Standard --allocation-method static --query publicIp.ipAddress -o tsv
116113
```
117114

115+
> [!NOTE]
116+
> Alternatively, you can create an IP address in a different resource group, which you can manage separately from your AKS cluster. If you create an IP address in a different resource group, ensure the following are true:
117+
>
118+
> * The cluster identity used by the AKS cluster has delegated permissions to the resource group, such as *Network Contributor*.
119+
> * Add the `--set controller.service.annotations."service\.beta\.kubernetes\.io/azure-load-balancer-resource-group"="<RESOURCE_GROUP>"` parameter. Replace `<RESOURCE_GROUP>` with the name of the resource group where the IP address resides.
120+
121+
3. Add the `--set controller.service.annotations."service\.beta\.kubernetes\.io/azure-dns-label-name"="<DNS_LABEL>"` parameter. The DNS label can be set either when the ingress controller is first deployed, or it can be configured later.
122+
123+
4. Add the `--set controller.service.loadBalancerIP="<STATIC_IP>"` parameter. Specify your own public IP address that was created in the previous step.
124+
125+
```azurecli-interactive
126+
DNS_LABEL="<DNS_LABEL>"
127+
NAMESPACE="ingress-basic"
128+
STATIC_IP=<STATIC_IP>
129+
130+
helm upgrade nginx-ingress ingress-nginx/ingress-nginx \
131+
--namespace $NAMESPACE \
132+
--set controller.service.annotations."service\.beta\.kubernetes\.io/azure-dns-label-name"=$DNS_LABEL \
133+
--set controller.service.loadBalancerIP=$STATIC_IP
134+
```
135+
118136
### [Azure PowerShell](#tab/azure-powershell)
119137

120-
Get the resource group name of the AKS cluster with the [`Get-AzAksCluster`][get-az-aks-cluster] command.
138+
1. Get the resource group name of the AKS cluster with the [`Get-AzAksCluster`][get-az-aks-cluster] command.
121139

122140
```azurepowershell-interactive
123141
(Get-AzAksCluster -ResourceGroupName $ResourceGroup -Name myAKSCluster).NodeResourceGroup
124142
```
125143

126-
Next, create a public IP address with the *static* allocation method using the [`New-AzPublicIpAddress`][new-az-public-ip-address] command. The following example creates a public IP address named *myAKSPublicIP* in the AKS cluster resource group obtained in the previous step.
144+
2. Create a public IP address with the *static* allocation method using the [`New-AzPublicIpAddress`][new-az-public-ip-address] command. The following example creates a public IP address named *myAKSPublicIP* in the AKS cluster resource group obtained in the previous step.
127145

128146
```azurepowershell-interactive
129147
(New-AzPublicIpAddress -ResourceGroupName MC_myResourceGroup_myAKSCluster_eastus -Name myAKSPublicIP -Sku Standard -AllocationMethod Static -Location eastus).IpAddress
130148
```
131149

132-
---
133-
134150
> [!NOTE]
135151
> Alternatively, you can create an IP address in a different resource group, which you can manage separately from your AKS cluster. If you create an IP address in a different resource group, ensure the following are true:
136152
>
137153
> * The cluster identity used by the AKS cluster has delegated permissions to the resource group, such as *Network Contributor*.
138154
> * Add the `--set controller.service.annotations."service\.beta\.kubernetes\.io/azure-load-balancer-resource-group"="<RESOURCE_GROUP>"` parameter. Replace `<RESOURCE_GROUP>` with the name of the resource group where the IP address resides.
139-
>
140-
141-
You must pass a parameter to the Helm release when you upgrade the ingress controller. Passing a parameter ensures that the ingress controller service is made aware of the load balancer that will be allocated to it. For the HTTPS certificates to work correctly, a DNS name label is used to configure a fully qualified domain name (FQDN) for the ingress controller IP address.
142-
143-
1. Add the `--set controller.service.annotations."service\.beta\.kubernetes\.io/azure-dns-label-name"="<DNS_LABEL>"` parameter. The DNS label can be set either when the ingress controller is first deployed, or it can be configured later.
144-
2. Add the `--set controller.service.loadBalancerIP="<STATIC_IP>"` parameter. Specify your own public IP address that was created in the previous step.
145-
146-
### [Azure CLI](#tab/azure-cli)
147-
148-
```azurecli
149-
DNS_LABEL="demo-aks-ingress"
150-
NAMESPACE="ingress-basic"
151-
STATIC_IP=<STATIC_IP>
152155
153-
helm upgrade ingress-nginx ingress-nginx/ingress-nginx \
154-
--namespace $NAMESPACE \
155-
--set controller.service.annotations."service\.beta\.kubernetes\.io/azure-dns-label-name"=$DNS_LABEL \
156-
--set controller.service.loadBalancerIP=$STATIC_IP
157-
```
156+
3. Add the --set controller.service.annotations."service\.beta\.kubernetes\.io/azure-dns-label-name"="<DNS_LABEL>" parameter. The DNS label can be set either when the ingress controller is first deployed, or it can be configured later.
158157

159-
### [Azure PowerShell](#tab/azure-powershell)
158+
4. Add the --set controller.service.loadBalancerIP="<STATIC_IP>" parameter. Specify your own public IP address that was created in the previous step.
160159

161-
```azurepowershell
162-
$DnsLabel = "demo-aks-ingress"
160+
```azurepowershell-interactive
161+
$DnsLabel = "<DNS_LABEL>"
163162
$Namespace = "ingress-basic"
164163
$StaticIP = "<STATIC_IP>"
165164
166-
helm upgrade ingress-nginx ingress-nginx/ingress-nginx `
165+
helm upgrade nginx-ingress ingress-nginx/ingress-nginx `
167166
--namespace $Namespace `
168167
--set controller.service.annotations."service\.beta\.kubernetes\.io/azure-dns-label-name"=$DnsLabel `
169168
--set controller.service.loadBalancerIP=$StaticIP

0 commit comments

Comments
 (0)