You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## (Optional) Block access to the default domain name
335
-
336
-
After you add the custom domain and configure your application, users will still be able to access the <tenant-name>.b2clogin.com domain. If you want to prevent access, you can configure the policy to check the authorization request "host name" against an allowed list of domains. The host name is the domain name that appears in the URL. The host name is available through `{Context:HostName}`[claim resolvers](claim-resolver-overview.md). Then you can present a custom error message.
337
-
338
-
1. Get the example of a conditional access policy that checks the host name from [GitHub](https://github.com/azure-ad-b2c/samples/tree/master/policies/check-host-name).
339
-
1. In each file, replace the string `yourtenant` with the name of your Azure AD B2C tenant. For example, if the name of your B2C tenant is *contosob2c*, all instances of `yourtenant.onmicrosoft.com` become `contosob2c.onmicrosoft.com`.
340
-
1. Upload the policy files in the following order: `B2C_1A_TrustFrameworkExtensions_HostName.xml` and then `B2C_1A_signup_signin_HostName.xml`.
Copy file name to clipboardExpand all lines: articles/ai-services/document-intelligence/includes/preview-notice.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,8 @@ ms.date: 02/29/2024
15
15
>
16
16
> * Document Intelligence public preview releases provide early access to features that are in active development.
17
17
> * Features, approaches, and processes may change, prior to General Availability (GA), based on user feedback.
18
-
> * The public preview version of Document Intelligence client libraries default to REST API version [**2024-02-29-preview**](https://westus.dev.cognitive.microsoft.com/docs/services/document-intelligence-api-2024-02-29-preview/operations/AnalyzeDocument).
19
-
> * Public preview version [**2024-02-29-preview**](https://westus.dev.cognitive.microsoft.com/docs/services/document-intelligence-api-2024-02-29-preview/operations/AnalyzeDocument) is currently only available in the following Azure regions:
18
+
> * The public preview version of Document Intelligence client libraries default to REST API version [**2024-02-29-preview**](/rest/api/aiservices/operation-groups?view=rest-aiservices-2024-02-29-preview&preserve-view=true).
19
+
> * Public preview version [**2024-02-29-preview**](/rest/api/aiservices/operation-groups?view=rest-aiservices-2024-02-29-preview&preserve-view=true) is currently only available in the following Azure regions:
Copy file name to clipboardExpand all lines: articles/aks/learn/quick-kubernetes-deploy-azd.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,15 +39,15 @@ You can review the application code in the [Azure-Samples/aks-store-demo GitHub
39
39
40
40
The quickstart application includes the following Kubernetes deployments and services:
41
41
42
-
:::image type="content" source="media/quick-kubernetes-deploy-portal/aks-store-architecture.png" alt-text="Screenshot of Azure Store sample architecture." lightbox="media/quick-kubernetes-deploy-portal/aks-store-architecture.png":::
42
+
:::image type="content" source="media/quick-kubernetes-deploy-portal/aks-store-architecture.png" alt-text="Diagram that shows the Azure Store sample architecture." lightbox="media/quick-kubernetes-deploy-portal/aks-store-architecture.png":::
43
43
44
44
-**Store front**: Web application for customers to view products and place orders.
45
45
-**Product service**: Shows product information.
46
46
-**Order service**: Places orders.
47
47
-**Rabbit MQ**: Message queue for an order queue.
48
48
49
49
> [!NOTE]
50
-
> We don't recommend running stateful containers, such as Rabbit MQ, without persistent storage for production use. These are used here for simplicity, but we recommend using managed services instead, such as Azure CosmosDB or Azure Service Bus.
50
+
> We don't recommend running stateful containers, such as Rabbit MQ, without persistent storage for production use. These are used here for simplicity, but we recommend using managed services instead, such as Azure Cosmos DB or Azure Service Bus.
Copy file name to clipboardExpand all lines: articles/aks/learn/quick-kubernetes-deploy-terraform.md
+217-8Lines changed: 217 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,16 @@
1
1
---
2
2
title: 'Quickstart: Deploy an Azure Kubernetes Service (AKS) cluster using Terraform'
3
3
description: Learn how to quickly deploy a Kubernetes cluster using Terraform and deploy an application in Azure Kubernetes Service (AKS).
4
+
ms.author: schaffererin
5
+
author: schaffererin
4
6
ms.topic: quickstart
5
-
ms.date: 01/12/2024
7
+
ms.date: 03/22/2024
6
8
ms.custom: devx-track-terraform
7
9
content_well_notification:
8
10
- AI-contribution
9
11
#Customer intent: As a developer or cluster operator, I want to quickly deploy an AKS cluster and deploy an application so that I can see how to run applications using the managed Kubernetes service in Azure.
10
12
ai-usage: ai-assisted
13
+
zone_pivot_groups: aks-azure-developer-cli
11
14
---
12
15
13
16
# Quickstart: Deploy an Azure Kubernetes Service (AKS) cluster using Terraform
@@ -24,7 +27,15 @@ Azure Kubernetes Service (AKS) is a managed Kubernetes service that lets you qui
24
27
25
28
* This quickstart assumes a basic understanding of Kubernetes concepts. For more information, see [Kubernetes core concepts for Azure Kubernetes Service (AKS)][kubernetes-concepts].
26
29
* You need an Azure account with an active subscription. If you don't have one, [create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
30
+
* Follow the instructions based on your command line interface.
31
+
32
+
:::zone pivot="development-environment-azure-cli"
33
+
27
34
* To learn more about creating a Windows Server node pool, see [Create an AKS cluster that supports Windows Server containers](quick-windows-container-deploy-cli.md).
35
+
36
+
> [!NOTE]
37
+
> The Azure Linux node pool is now in general availablility (GA). To learn about the benefits and deployment steps, see the [Introduction to the Azure Linux Container Host for AKS][intro-azure-linux].
38
+
28
39
*[Install and configure Terraform](/azure/developer/terraform/quickstart-configure).
* Create a random value for the Azure resource group name using [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet).
@@ -34,9 +45,6 @@ Azure Kubernetes Service (AKS) is a managed Kubernetes service that lets you qui
34
45
* Create an AzAPI resource [azapi_resource](https://registry.terraform.io/providers/Azure/azapi/latest/docs/resources/azapi_resource).
35
46
* Create an AzAPI resource to generate an SSH key pair using [azapi_resource_action](https://registry.terraform.io/providers/Azure/azapi/latest/docs/resources/azapi_resource_action).
36
47
37
-
> [!NOTE]
38
-
> The Azure Linux node pool is now generally available (GA). To learn about the benefits and deployment steps, see the [Introduction to the Azure Linux Container Host for AKS][intro-azure-linux].
39
-
40
48
## Login to your Azure account
41
49
42
50
First, log into your Azure account and authenticate using one of the methods described in the following section.
@@ -136,7 +144,7 @@ First, log into your Azure account and authenticate using one of the methods des
136
144
137
145
## Deploy the application
138
146
139
-
To deploy the application, you use a manifest file to create all the objects required to run the [AKS Store application](https://github.com/Azure-Samples/aks-store-demo). A [Kubernetes manifest file][kubernetes-deployment] defines a cluster's desired state, such as which container images to run. The manifest includes the following Kubernetes deployments and services:
147
+
To deploy the application, you use a manifest file to create all the objects required to run the [AKS Store application][aks-store-demo]. A [Kubernetes manifest file][kubernetes-deployment] defines a cluster's desired state, such as which container images to run. The manifest includes the following Kubernetes deployments and services:
140
148
141
149
:::image type="content" source="media/quick-kubernetes-deploy-terraform/aks-store-architecture.png" alt-text="Screenshot of Azure Store sample architecture." lightbox="media/quick-kubernetes-deploy-terraform/aks-store-architecture.png":::
142
150
@@ -458,6 +466,195 @@ When the application runs, a Kubernetes service exposes the application front en
* [Install the Azure Developer CLI (AZD)][azd-install]
474
+
* [Install and configure Terraform](/azure/developer/terraform/quickstart-configure).
475
+
* You can review the application code used in the Azure-Samples/[aks-store-demo repo][aks-store-demo].
476
+
477
+
## Clone the Azure Developer CLI template
478
+
479
+
The Azure Developer CLI allows you to quickly download samples from the **Azure-Samples** repository. In our quickstart, you download the `aks-store-demo` application. For more information on the general uses cases, see the [`azd` overview][azd-overview].
480
+
481
+
1. Clone the AKS store demo template from the **Azure-Samples** repository using the [`azd init`][azd-init] command with the `--template` parameter.
482
+
483
+
```azdeveloper
484
+
azd init --template Azure-Samples/aks-store-demo
485
+
```
486
+
487
+
2. Enter an environment name for your project that uses only alphanumeric characters and hyphens, such as *aks-terraform-1*.
488
+
489
+
```output
490
+
Enter a new environment name: aks-terraform-1
491
+
```
492
+
493
+
## Sign in to your Azure Cloud account
494
+
495
+
The `azd` template contains all the code needed to create the services, but you need to sign in to your Azure account in order to host the application on AKS.
496
+
497
+
1. Sign in to your account using the [`azd auth login`][az-auth-login] command.
498
+
499
+
```azdeveloper
500
+
azd auth login
501
+
```
502
+
503
+
2. Copy the device code that appears in the output and press enter to sign in.
504
+
505
+
```output
506
+
Start by copying the next code: XXXXXXXXX
507
+
Then press enter and continue to log in from your browser...
508
+
```
509
+
510
+
> [!IMPORTANT]
511
+
> If you're using an out-of-network virtual machine or GitHub Codespace, certain Azure security policies cause conflicts when used to sign in with `azd auth login`. If you run into an issue here, you can follow the azd auth workaround provided, which involves using a `curl` request to the localhost URL you were redirected to after running [`azd auth login`][az-auth-login].
512
+
513
+
3. Authenticate with your credentials on your organization's sign in page.
514
+
4. Confirm that it's you trying to connect from the Azure CLI.
515
+
5. Verify the message "Device code authentication completed. Logged in to Azure." appears in your original terminal.
516
+
517
+
```output
518
+
Waiting for you to complete authentication in the browser...
To deploy the application, you use the `azd up` command to create all the objects required to run the [AKS Store application][aks-store-demo].
527
+
528
+
* An `azure.yaml` file defines a cluster's desired state, such as which container images to fetch and includes the following Kubernetes deployments and services:
529
+
530
+
:::image type="content" source="media/quick-kubernetes-deploy-terraform/aks-store-architecture.png" alt-text="Diagram that shows the Azure Store sample architecture." lightbox="media/quick-kubernetes-deploy-terraform/aks-store-architecture.png":::
531
+
532
+
* **Store front**: Web application for customers to view products and place orders.
533
+
* **Product service**: Shows product information.
534
+
* **Order service**: Places orders.
535
+
* **Rabbit MQ**: Message queue for an order queue.
536
+
537
+
> [!NOTE]
538
+
> We don't recommend running stateful containers, such as Rabbit MQ, without persistent storage for production. These are used here for simplicity, but we recommend using managed services, such as Azure Cosmos DB or Azure Service Bus.
539
+
540
+
### Deploy application resources
541
+
542
+
The `azd` template for this quickstart creates a new resource group with an AKS cluster and an Azure Key Vault. The key vault stores client secrets and runs the services in the `pets` namespace.
543
+
544
+
1. Create all the application resources using the [`azd up`][azd-up] command.
545
+
546
+
```azdeveloper
547
+
azd up
548
+
```
549
+
550
+
`azd up` runs all the hooks inside of the [`azd-hooks` folder](https://github.com/Azure-Samples/aks-store-demo/tree/main/azd-hooks) to preregister, provision, and deploy the application services.
551
+
552
+
Customize hooks to add custom code into the `azd` workflow stages. For more information, see the [`azd` hooks][azd-hooks] reference.
553
+
554
+
2. Select an Azure subscription for your billing usage.
555
+
556
+
```output
557
+
? Select an Azure Subscription to use: [Use arrows to move, type to filter]
558
+
> 1. My Azure Subscription (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
559
+
```
560
+
561
+
3. Select a region to deploy your application to.
562
+
563
+
```output
564
+
Select an Azure location to use: [Use arrows to move, type to filter]
565
+
1. (South America) Brazil Southeast (brazilsoutheast)
566
+
2. (US) Central US (centralus)
567
+
3. (US) East US (eastus)
568
+
> 43. (US) East US 2 (eastus2)
569
+
4. (US) East US STG (eastusstg)
570
+
5. (US) North Central US (northcentralus)
571
+
6. (US) South Central US (southcentralus)
572
+
```
573
+
574
+
`azd` automatically runs the preprovision and postprovision hooks to create the resources for your application. This process can take a few minutes to complete. Once complete, you should see an output similar to the following example:
575
+
576
+
```output
577
+
SUCCESS: Your workflow to provision and deploy to Azure completed in 9 minutes 40 seconds.
578
+
```
579
+
580
+
### Generate Terraform plans
581
+
582
+
Within your Azure Developer template, the `/infra/terraform` folder contains all the code used to generate the Terraform plan.
583
+
584
+
Terraform deploys and runs commands using `terraform apply` as part of `azd`'s provisioning step. Once complete, you should see an output similar to the following example:
585
+
586
+
```output
587
+
Plan: 5 to add, 0 to change, 0 to destroy.
588
+
...
589
+
Saved the plan to: /workspaces/aks-store-demo/.azure/aks-terraform-azd/infra/terraform/main.tfplan
590
+
```
591
+
592
+
## Test the application
593
+
594
+
When the application runs, a Kubernetes service exposes the application front end to the internet. This process can take a few minutes to complete.
595
+
596
+
1. Set your namespace as the demo namespace `pets` using the [`kubectl set-context`][kubectl-set-context] command.
2. Check the status of the deployed pods using the [`kubectl get pods`][kubectl-get-pods] command. Make sure all pods are `Running` before proceeding.
603
+
604
+
```console
605
+
kubectl get pods
606
+
```
607
+
608
+
3. Check for a public IP address for the store-front application and monitor progress using the [`kubectl get service`][kubectl-get] command with the `--watch` argument.
609
+
610
+
```console
611
+
kubectl get service store-front --watch
612
+
```
613
+
614
+
The **EXTERNAL-IP** output for the `store-front` service initially shows as *pending*:
5. Open a web browser to the external IP address of your service to see the Azure Store app in action.
631
+
632
+
:::image type="content" source="media/quick-kubernetes-deploy-cli/aks-store-application.png" alt-text="Screenshot of AKS Store sample application." lightbox="media/quick-kubernetes-deploy-cli/aks-store-application.png":::
633
+
634
+
## Delete the cluster
635
+
636
+
Once you're finished with the quickstart, clean up unnecessary resources to avoid Azure charges.
637
+
638
+
1. Delete all the resources created in the quickstart using the [`azd down`][azd-down] command.
639
+
640
+
```azdeveloper
641
+
azd down
642
+
```
643
+
644
+
2. Confirm your decision to remove all used resources from your subscription by typing `y` and pressing `Enter`.
645
+
646
+
```output
647
+
? Total resources to delete: 14, are you sure you want to continue? (y/N)
648
+
```
649
+
650
+
3. Allow purge to reuse the quickstart variables if applicable by typing `y` and pressing `Enter`.
651
+
652
+
```output
653
+
[Warning]: These resources have soft delete enabled allowing them to be recovered for a period or time after deletion. During this period, their names can't be reused. In the future, you can use the argument --purge to skip this confirmation.
654
+
```
655
+
656
+
:::zone-end
657
+
461
658
## Troubleshoot Terraform on Azure
462
659
463
660
[Troubleshoot common problems when using Terraform on Azure](/azure/developer/terraform/troubleshoot).
@@ -469,13 +666,25 @@ In this quickstart, you deployed a Kubernetes cluster and then deployed a simple
469
666
To learn more about AKS and walk through a complete code-to-deployment example, continue to the Kubernetes cluster tutorial.
0 commit comments