Skip to content

Commit 1bf186a

Browse files
committed
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-pr into rolyon-abac-attribute-definition-update
2 parents ecfbfed + 27ee646 commit 1bf186a

File tree

8 files changed

+435
-207
lines changed

8 files changed

+435
-207
lines changed

articles/aks/ingress-tls.md

Lines changed: 182 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,34 @@ You can also:
2626

2727
## Before you begin
2828

29-
This article assumes that you have an existing AKS cluster. If you need an AKS cluster, see the AKS quickstart [using the Azure CLI][aks-quickstart-cli] or [using the Azure portal][aks-quickstart-portal].
29+
This article assumes that you have an existing AKS cluster. If you need an AKS cluster, see the AKS quickstart [using the Azure CLI][aks-quickstart-cli], [using Azure PowerShell][aks-quickstart-powershell] or [using the Azure portal][aks-quickstart-portal].
3030

3131
This article also assumes you have [a custom domain][custom-domain] with a [DNS Zone][dns-zone] in the same resource group as your AKS cluster.
3232

3333
This article uses [Helm 3][helm] to install the NGINX ingress controller on a [supported version of Kubernetes][aks-supported versions]. Make sure that you are using the latest release of Helm and have access to the `ingress-nginx` and `jetstack` Helm repositories. The steps outlined in this article may not be compatible with previous versions of the Helm chart, NGINX ingress controller, or Kubernetes.
3434

3535
For more information on configuring and using Helm, see [Install applications with Helm in Azure Kubernetes Service (AKS)][use-helm]. For upgrade instructions, see the [Helm install docs][helm-install].
3636

37-
This article also requires that you are running the Azure CLI version 2.0.64 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][azure-cli-install].
37+
### [Azure CLI](#tab/azure-cli)
3838

3939
In addition, this article assumes you have an existing AKS cluster with an integrated ACR. For more details on creating an AKS cluster with an integrated ACR, see [Authenticate with Azure Container Registry from Azure Kubernetes Service][aks-integrated-acr].
4040

41+
This article also requires that you are running the Azure CLI version 2.0.64 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][azure-cli-install].
42+
43+
### [Azure PowerShell](#tab/azure-powershell)
44+
45+
In addition, this article assumes you have an existing AKS cluster with an integrated ACR. For more details on creating an AKS cluster with an integrated ACR, see [Authenticate with Azure Container Registry from Azure Kubernetes Service][aks-integrated-acr-ps].
46+
47+
This article also requires that you're running Azure PowerShell version 5.9.0 or later. Run `Get-InstalledModule -Name Az` to find the version. If you need to install or upgrade, see [Install Azure PowerShell][azure-powershell-install].
48+
49+
---
4150
## Import the images used by the Helm chart into your ACR
4251

43-
This article uses the [NGINX ingress controller Helm chart][ingress-nginx-helm-chart], which relies on three container images. Use `az acr import` to import those images into your ACR.
52+
This article uses the [NGINX ingress controller Helm chart][ingress-nginx-helm-chart], which relies on three container images.
53+
54+
### [Azure CLI](#tab/azure-cli)
55+
56+
Use `az acr import` to import those images into your ACR.
4457

4558
```azurecli
4659
REGISTRY_NAME=<REGISTRY_NAME>
@@ -65,6 +78,37 @@ az acr import --name $REGISTRY_NAME --source $CERT_MANAGER_REGISTRY/$CERT_MANAGE
6578
az acr import --name $REGISTRY_NAME --source $CERT_MANAGER_REGISTRY/$CERT_MANAGER_IMAGE_CAINJECTOR:$CERT_MANAGER_TAG --image $CERT_MANAGER_IMAGE_CAINJECTOR:$CERT_MANAGER_TAG
6679
```
6780

81+
### [Azure PowerShell](#tab/azure-powershell)
82+
83+
```azurepowershell
84+
$RegistryName = "<REGISTRY_NAME>"
85+
$ResourceGroup = (Get-AzContainerRegistry | Where-Object {$_.name -eq $RegistryName} ).ResourceGroupName
86+
$ControllerRegistry = "k8s.gcr.io"
87+
$ControllerImage = "ingress-nginx/controller"
88+
$ControllerTag = "v1.0.4"
89+
$PatchRegistry = "docker.io"
90+
$PatchImage = "jettech/kube-webhook-certgen"
91+
$PatchTag = "v1.5.1"
92+
$DefaultBackendRegistry = "k8s.gcr.io"
93+
$DefaultBackendImage = "defaultbackend-amd64"
94+
$DefaultBackendTag = "1.5"
95+
$CertManagerRegistry = "quay.io"
96+
$CertManagerTag = "v1.3.1"
97+
$CertManagerImageController = "jetstack/cert-manager-controller"
98+
$CertManagerImageWebhook = "jetstack/cert-manager-webhook"
99+
$CertManagerImageCaInjector = "jetstack/cert-manager-cainjector"
100+
101+
Import-AzContainerRegistryImage -ResourceGroupName $ResourceGroup -RegistryName $RegistryName -SourceRegistryUri $ControllerRegistry -SourceImage "${ControllerImage}:${ControllerTag}"
102+
Import-AzContainerRegistryImage -ResourceGroupName $ResourceGroup -RegistryName $RegistryName -SourceRegistryUri $PatchRegistry -SourceImage "${PatchImage}:${PatchTag}"
103+
Import-AzContainerRegistryImage -ResourceGroupName $ResourceGroup -RegistryName $RegistryName -SourceRegistryUri $DefaultBackendRegistry -SourceImage "${DefaultBackendImage}:${DefaultBackendTag}"
104+
Import-AzContainerRegistryImage -ResourceGroupName $ResourceGroup -RegistryName $RegistryName -SourceRegistryUri $CertManagerRegistry -SourceImage "${CertManagerImageController}:${CertManagerTag}"
105+
Import-AzContainerRegistryImage -ResourceGroupName $ResourceGroup -RegistryName $RegistryName -SourceRegistryUri $CertManagerRegistry -SourceImage "${CertManagerImageWebhook}:${CertManagerTag}"
106+
Import-AzContainerRegistryImage -ResourceGroupName $ResourceGroup -RegistryName $RegistryName -SourceRegistryUri $CertManagerRegistry -SourceImage "${CertManagerImageCaInjector}:${CertManagerTag}"
107+
108+
```
109+
110+
---
111+
68112
> [!NOTE]
69113
> In addition to importing container images into your ACR, you can also import Helm charts into your ACR. For more information, see [Push and pull Helm charts to an Azure container registry][acr-helm].
70114
@@ -80,6 +124,8 @@ The ingress controller also needs to be scheduled on a Linux node. Windows Serve
80124
> [!TIP]
81125
> If you would like to enable [client source IP preservation][client-source-ip] for requests to containers in your cluster, add `--set controller.service.externalTrafficPolicy=Local` to the Helm install command. The client source IP is stored in the request header under *X-Forwarded-For*. When using an ingress controller with client source IP preservation enabled, TLS pass-through will not work.
82126
127+
### [Azure CLI](#tab/azure-cli)
128+
83129
```console
84130
# Add the ingress-nginx repository
85131
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
@@ -108,6 +154,44 @@ helm install nginx-ingress ingress-nginx/ingress-nginx \
108154
--set defaultBackend.image.digest=""
109155
```
110156

157+
### [Azure PowerShell](#tab/azure-powershell)
158+
159+
```azurepowershell
160+
# Create a namespace for your ingress resources
161+
kubectl create namespace ingress-basic
162+
163+
# Add the ingress-nginx repository
164+
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
165+
166+
# Set variable for ACR location to use for pulling images
167+
$AcrUrl = "$RegistryName.azurecr.io"
168+
169+
# Get the SHA256 digest of the controller and patch images
170+
$ControllerDigest = (Get-AzContainerRegistryTag -RegistryName $RegistryName -RepositoryName $ControllerImage -Name $ControllerTag).Attributes.digest
171+
$PatchDigest = (Get-AzContainerRegistryTag -RegistryName $RegistryName -RepositoryName $PatchImage -Name $PatchTag).Attributes.digest
172+
173+
# Use Helm to deploy an NGINX ingress controller
174+
helm install nginx-ingress ingress-nginx/ingress-nginx `
175+
--namespace ingress-basic `
176+
--set controller.replicaCount=2 `
177+
--set controller.nodeSelector."kubernetes\.io/os"=linux `
178+
--set controller.image.registry=$AcrUrl `
179+
--set controller.image.image=$ControllerImage `
180+
--set controller.image.tag=$ControllerTag `
181+
--set controller.image.digest=$ControllerDigest `
182+
--set controller.admissionWebhooks.patch.nodeSelector."kubernetes\.io/os"=linux `
183+
--set controller.admissionWebhooks.patch.image.registry=$AcrUrl `
184+
--set controller.admissionWebhooks.patch.image.image=$PatchImage `
185+
--set controller.admissionWebhooks.patch.image.tag=$PatchTag `
186+
--set controller.admissionWebhooks.patch.image.digest=$PatchDigest `
187+
--set defaultBackend.nodeSelector."kubernetes\.io/os"=linux `
188+
--set defaultBackend.image.registry=$AcrUrl `
189+
--set defaultBackend.image.image=$DefaultBackendImage `
190+
--set defaultBackend.image.tag=$DefaultBackendTag
191+
```
192+
193+
---
194+
111195
During the installation, an Azure public IP address is created for the ingress controller. This public IP address is static for the life-span of the ingress controller. If you delete the ingress controller, the public IP address assignment is lost. If you then create an additional ingress controller, a new public IP address is assigned. If you wish to retain the use of the public IP address, you can instead [create an ingress controller with a static public IP address][aks-ingress-static-tls].
112196

113197
To get the public IP address, use the `kubectl get service` command. It takes a few minutes for the IP address to be assigned to the service.
@@ -123,16 +207,35 @@ No ingress rules have been created yet. If you browse to the public IP address,
123207

124208
## Add an A record to your DNS zone
125209

210+
### [Azure CLI](#tab/azure-cli)
211+
126212
Add an *A* record to your DNS zone with the external IP address of the NGINX service using [az network dns record-set a add-record][az-network-dns-record-set-a-add-record].
127213

128-
```console
214+
```azurecli
129215
az network dns record-set a add-record \
130216
--resource-group myResourceGroup \
131217
--zone-name MY_CUSTOM_DOMAIN \
132218
--record-set-name "*" \
133219
--ipv4-address MY_EXTERNAL_IP
134220
```
135221

222+
### [Azure PowerShell](#tab/azure-powershell)
223+
224+
Add an *A* record to your DNS zone with the external IP address of the NGINX service using [New-AzDnsRecordSet][new-az-dns-recordset-create-a-record].
225+
226+
```azurepowershell
227+
$Records = @()
228+
$Records += New-AzDnsRecordConfig -IPv4Address <External IP>
229+
New-AzDnsRecordSet -Name "*" `
230+
-RecordType A `
231+
-ResourceGroupName <Name of Resource Group for the DNS Zone> `
232+
-ZoneName <Custom Domain Name> `
233+
-TTL 3600
234+
-DnsRecords $Records
235+
```
236+
237+
---
238+
136239
### Configure an FQDN for the ingress controller
137240
Optionally, you can configure an FQDN for the ingress controller IP address instead of a custom domain. Your FQDN will be of the form `<CUSTOM LABEL>.<AZURE REGION NAME>.cloudapp.azure.com`.
138241

@@ -141,6 +244,8 @@ There are two methods for this configuration described below.
141244
#### Method 1: Set the DNS label using the Azure CLI
142245
Note that this sample is for a Bash shell.
143246

247+
### [Azure CLI](#tab/azure-cli)
248+
144249
```bash
145250
# Public IP address of your ingress controller
146251
IP="MY_EXTERNAL_IP"
@@ -158,11 +263,32 @@ az network public-ip update --ids $PUBLICIPID --dns-name $DNSNAME
158263
az network public-ip show --ids $PUBLICIPID --query "[dnsSettings.fqdn]" --output tsv
159264
```
160265

266+
### [Azure PowerShell](#tab/azure-powershell)
267+
268+
```azurepowershell
269+
# Public IP address of your ingress controller
270+
$AksIpAddress = "MY_EXTERNAL_IP"
271+
272+
# Get the Public IP Address for the ingress controller
273+
$PublicIp = Get-AzPublicIpAddress | Where-Object {$_.IpAddress -eq $AksIpAddress}
274+
275+
# Update public ip address with DNS name
276+
$PublicIp.DnsSettings = @{"DomainNameLabel" = "demo-aks-ingress"}
277+
$UpdatedPublicIp = Set-AzPublicIpAddress -PublicIpAddress $publicIp
278+
279+
# Display the FQDN
280+
Write-Output $UpdatedPublicIp.DnsSettings.Fqdn
281+
```
282+
283+
---
284+
161285
#### Method 2: Set the DNS label using helm chart settings
162286
You can pass an annotation setting to your helm chart configuration by using the `--set controller.service.annotations."service\.beta\.kubernetes\.io/azure-dns-label-name"` parameter. This can be set either when the ingress controller is first deployed, or it can be configured later.
163287
The following example shows how to update this setting after the controller has been deployed.
164288

165-
```
289+
### [Azure CLI](#tab/azure-cli)
290+
291+
```bash
166292
DNS_LABEL="demo-aks-ingress"
167293
NAMESPACE="nginx-basic"
168294

@@ -172,13 +298,29 @@ helm upgrade ingress-nginx ingress-nginx/ingress-nginx \
172298

173299
```
174300

301+
### [Azure PowerShell](#tab/azure-powershell)
302+
303+
```azurepowershell
304+
$DnsLabel = "demo-aks-ingress"
305+
$Namespace = "nginx-basic"
306+
307+
helm upgrade ingress-nginx ingress-nginx/ingress-nginx \
308+
--namespace $Namespace \
309+
--set controller.service.annotations."service\.beta\.kubernetes\.io/azure-dns-label-name"=$DnsLabel
310+
311+
```
312+
313+
---
314+
175315
## Install cert-manager
176316

177317
The NGINX ingress controller supports TLS termination. There are several ways to retrieve and configure certificates for HTTPS. This article demonstrates using [cert-manager][cert-manager], which provides automatic [Lets Encrypt][lets-encrypt] certificate generation and management functionality.
178318

179319
To install the cert-manager controller:
180320

181-
```console
321+
### [Azure CLI](#tab/azure-cli)
322+
323+
```bash
182324
# Label the ingress-basic namespace to disable resource validation
183325
kubectl label namespace ingress-basic cert-manager.io/disable-validation=true
184326

@@ -202,6 +344,34 @@ helm install cert-manager jetstack/cert-manager \
202344
--set cainjector.image.tag=$CERT_MANAGER_TAG
203345
```
204346

347+
### [Azure PowerShell](#tab/azure-powershell)
348+
349+
```azurepowershell
350+
# Label the ingress-basic namespace to disable resource validation
351+
kubectl label namespace ingress-basic cert-manager.io/disable-validation=true
352+
353+
# Add the Jetstack Helm repository
354+
helm repo add jetstack https://charts.jetstack.io
355+
356+
# Update your local Helm chart repository cache
357+
helm repo update
358+
359+
# Install the cert-manager Helm chart
360+
helm install cert-manager jetstack/cert-manager `
361+
--namespace ingress-basic `
362+
--version $CertManagerTag `
363+
--set installCRDs=true `
364+
--set nodeSelector."kubernetes\.io/os"=linux `
365+
--set image.repository="${AcrUrl}/${CertManagerImageController}" `
366+
--set image.tag=$CertManagerTag `
367+
--set webhook.image.repository="${AcrUrl}/${CertManagerImageWebhook}" `
368+
--set webhook.image.tag=$CertManagerTag `
369+
--set cainjector.image.repository="${AcrUrl}/${CertManagerImageCaInjector}" `
370+
--set cainjector.image.tag=$CertManagerTag
371+
```
372+
373+
---
374+
205375
For more information on cert-manager configuration, see the [cert-manager project][cert-manager].
206376

207377
## Create a CA cluster issuer
@@ -245,7 +415,7 @@ To see the ingress controller in action, run two demo applications in your AKS c
245415

246416
Create a *aks-helloworld-one.yaml* file and copy in the following example YAML:
247417

248-
```yml
418+
```yaml
249419
apiVersion: apps/v1
250420
kind: Deployment
251421
metadata:
@@ -283,7 +453,7 @@ spec:
283453

284454
Create a *aks-helloworld-two.yaml* file and copy in the following example YAML:
285455

286-
```yml
456+
```yaml
287457
apiVersion: apps/v1
288458
kind: Deployment
289459
metadata:
@@ -505,6 +675,7 @@ You can also:
505675

506676
<!-- LINKS - external -->
507677
[az-network-dns-record-set-a-add-record]: /cli/azure/network/dns/record-set/#az_network_dns_record_set_a_add_record
678+
[new-az-dns-recordset-create-a-record]: /powershell/module/az.dns/new-azdnsrecordset
508679
[custom-domain]: ../app-service/manage-custom-dns-buy-domain.md#buy-an-app-service-domain
509680
[dns-zone]: ../dns/dns-getstarted-cli.md
510681
[helm]: https://helm.sh/
@@ -530,9 +701,12 @@ You can also:
530701
[aks-http-app-routing]: http-application-routing.md
531702
[aks-ingress-own-tls]: ingress-own-tls.md
532703
[aks-quickstart-cli]: kubernetes-walkthrough.md
704+
[aks-quickstart-powershell]: kubernetes-walkthrough-powershell.md
533705
[aks-quickstart-portal]: kubernetes-walkthrough-portal.md
534706
[client-source-ip]: concepts-network.md#ingress-controllers
535707
[install-azure-cli]: /cli/azure/install-azure-cli
536708
[aks-supported versions]: supported-kubernetes-versions.md
537709
[aks-integrated-acr]: cluster-container-registry-integration.md?tabs=azure-cli#create-a-new-aks-cluster-with-acr-integration
710+
[aks-integrated-acr-ps]: cluster-container-registry-integration.md?tabs=azure-powershell#create-a-new-aks-cluster-with-acr-integration
711+
[azure-powershell-install]: /powershell/azure/install-az-ps
538712
[acr-helm]: ../container-registry/container-registry-helm-repos.md

articles/azure-monitor/app/platforms.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ ms.reviewer: olegan
2525

2626
### Auto-instrumentation (enable without code changes)
2727
* [ASP.NET - for web apps hosted with IIS](./status-monitor-v2-overview.md)
28+
* [ASP.NET Core - for web apps hosted with IIS](./status-monitor-v2-overview.md)
2829
* [Java](./java-in-process-agent.md)
2930

3031
### Manual instrumentation / SDK (some code changes required)

articles/marketplace/.openpublishing.redirection.marketplace.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,11 @@
205205
"redirect_url": "/azure/marketplace/azure-vm-use-own-image",
206206
"redirect_document_id": false
207207
},
208+
{
209+
"source_path_from_root": "/articles/marketplace/azure-vm-sas-failure-messages.md",
210+
"redirect_url": "/azure/marketplace/azure-vm-get-sas-uri",
211+
"redirect_document_id": false
212+
},
208213
{
209214
"source_path_from_root": "/articles/marketplace/become-publisher.md",
210215
"redirect_url": "/azure/marketplace/partner-center-portal/create-account",

articles/marketplace/TOC.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,6 @@
223223
href: azure-vm-image-test.md
224224
- name: Get SAS URI
225225
href: azure-vm-get-sas-uri.md
226-
- name: SAS failure messages
227-
href: azure-vm-sas-failure-messages.md
228226
- name: VM creation FAQ
229227
href: azure-vm-faq.yml
230228
- name: VM certification troubleshooting

0 commit comments

Comments
 (0)