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
Copy file name to clipboardExpand all lines: articles/aks/learn/quick-kubernetes-deploy-bicep-extensibility-kubernetes-provider.md
+42-43Lines changed: 42 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,39 +1,42 @@
1
1
---
2
-
title: Quickstart - Deploy Azure applications to Azure Kubernetes Services by using Bicep extensibility Kubernetes provider
3
-
description: Learn how to quickly create a Kubernetes cluster and deploy Azure applications in Azure Kubernetes Service (AKS) by using Bicep extensibility Kubernetes provider.
2
+
title: Quickstart: Deploy Azure applications to Azure Kubernetes Service clusters using Bicep extensibility Kubernetes provider
3
+
description: Learn how to quickly create a Kubernetes cluster and deploy Azure applications in Azure Kubernetes Service (AKS) using Bicep extensibility Kubernetes provider.
4
4
services: container-service
5
5
ms.topic: quickstart
6
6
ms.date: 02/03/2023
7
7
#Customer intent: As a developer or cluster operator, I want to quickly create an AKS cluster and deploy an application so that I can see how to run applications using the managed Kubernetes service in Azure.
8
8
---
9
9
10
-
# Quickstart: Deploy Azure applications to Azure Kubernetes Service (AKS) cluster using Bicep extensibility Kubernetes provider (Preview)
10
+
# Quickstart: Deploy Azure applications to Azure Kubernetes Service (AKS) clusters using Bicep extensibility Kubernetes provider (Preview)
11
11
12
-
Azure Kubernetes Service (AKS) is a managed Kubernetes service that lets you quickly deploy and manage clusters. In this quickstart, you'll deploy a sample multi-container application with a web front-end and a Redis instance to an AKS cluster. This quickstart assumes a basic understanding of Kubernetes concepts. For more information, see [Kubernetes core concepts for Azure Kubernetes Service (AKS)][kubernetes-concepts].
12
+
Azure Kubernetes Service (AKS) is a managed Kubernetes service that lets you quickly deploy and manage clusters. In this quickstart, you'll deploy a sample multi-container application with a web front-end and a Redis instance to an AKS cluster.
This quickstart assumes a basic understanding of Kubernetes concepts. For more information, see [Kubernetes core concepts for Azure Kubernetes Service (AKS)][kubernetes-concepts].
15
15
16
-
The Bicep Kubernetes provider is currently in preview. To enable the feature from the [Bicep configuration file](../../azure-resource-manager/bicep/bicep-config.md#enable-experimental-features).
> The Bicep Kubernetes provider is currently in preview. You can enable the feature from the [Bicep configuration file](../../azure-resource-manager/bicep/bicep-config.md#enable-experimental-features) by adding:
* To set up your environment for Bicep development, see [Install Bicep tools](../../azure-resource-manager/bicep/install.md). After completing those steps, you'll have [Visual Studio Code](https://code.visualstudio.com/) and the [Bicep extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep). You also have either the latest [Azure CLI](/cli/azure/) or the latest [Azure PowerShell module](/powershell/azure/new-azureps-module-az).
31
34
32
-
* To create an AKS cluster using a Bicep file, you provide an SSH public key. If you need this resource, see the following section; otherwise skip to the [Review the Bicep file](#review-the-bicep-file) section.
35
+
* To create an AKS cluster using a Bicep file, you provide an SSH public key. If you need this resource, see [Create an SSH key pair](#create-an-ssh-key-pair). If not, skip to [Review the Bicep file](#review-the-bicep-file).
33
36
34
-
* The identity you're using to create your cluster has the appropriate minimum permissions. For more information on access and identity for AKS, see [Access and identity options for Azure Kubernetes Service (AKS)](../concepts-identity.md).
37
+
* The identity you use to create your cluster has the appropriate minimum permissions. For more information on access and identity for AKS, see [Access and identity options for Azure Kubernetes Service (AKS)](../concepts-identity.md).
35
38
36
-
* To deploy a Bicep file, you need write access on the resources you're deploying and access to all operations on the Microsoft.Resources/deployments resource type. For example, to deploy a virtual machine, you need Microsoft.Compute/virtualMachines/write and Microsoft.Resources/deployments/* permissions. For a list of roles and permissions, see [Azure built-in roles](../../role-based-access-control/built-in-roles.md).
39
+
* To deploy a Bicep file, you need write access on the resources you deploy and access to all operations on the `Microsoft.Resources/deployments` resource type. For example, to deploy a virtual machine, you need `Microsoft.Compute/virtualMachines/write and Microsoft.Resources/deployments/*` permissions. For a list of roles and permissions, see [Azure built-in roles](../../role-based-access-control/built-in-roles.md).
37
40
38
41
### Create an SSH key pair
39
42
@@ -51,35 +54,31 @@ For more information about creating SSH keys, see [Create and manage SSH keys fo
51
54
52
55
## Review the Bicep file
53
56
54
-
The Bicep file used to create AKS cluster is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/aks/).
57
+
The Bicep file used to create an AKS cluster is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/aks/). For more AKS samples, see the [AKS quickstart templates][aks-quickstart-templates] site.
For more AKS samples, see the [AKS quickstart templates][aks-quickstart-templates] site.
61
+
The resource defined in the Bicep file is [**Microsoft.ContainerService/managedClusters**](/azure/templates/microsoft.containerservice/managedclusters?tabs=bicep&pivots=deployment-language-bicep).
63
62
64
-
Save a copy of the file as **main.bicep** to your local computer.
63
+
Save a copy of the file as `main.bicep` to your local computer.
65
64
66
65
## Add the application definition
67
66
68
67
A [Kubernetes manifest file][kubernetes-deployment] defines a cluster's desired state, such as which container images to run.
69
68
70
-
In this quickstart, you'll use a manifest to create all objects needed to run the [Azure Vote application][azure-vote-app]. This manifest includes two [Kubernetes deployments][kubernetes-deployment]:
69
+
In this quickstart, you use a manifest to create all objects needed to run the [Azure Vote application][azure-vote-app]. This manifest includes two [Kubernetes deployments][kubernetes-deployment]:
71
70
72
-
* The sample Azure Vote Python applications.
73
-
* A Redis instance.
71
+
* The sample Azure Vote Python applications
72
+
* A Redis instance
74
73
75
74
Two [Kubernetes Services][kubernetes-service] are also created:
76
75
77
-
* An internal service for the Redis instance.
78
-
* An external service to access the Azure Vote application from the internet.
76
+
* An internal service for the Redis instance
77
+
* An external service to access the Azure Vote application from the internet
79
78
80
79
Use the following procedure to add the application definition:
81
80
82
-
1. Create a file named **azure-vote.yaml** in the same folder as **main.bicep** with the following YAML definition:
81
+
1. Create a file named `azure-vote.yaml` in the same folder as `main.bicep` with the following YAML definition:
83
82
84
83
```yaml
85
84
apiVersion: apps/v1
@@ -171,20 +170,20 @@ Use the following procedure to add the application definition:
171
170
172
171
For a breakdown of YAML manifest files, see [Deployments and YAML manifests](../concepts-clusters-workloads.md#deployments-and-yaml-manifests).
173
172
174
-
1. Open **main.bicep** in Visual Studio Code.
173
+
1. Open `main.bicep` in Visual Studio Code.
175
174
1. Press <kbd>Ctrl+Shift+P</kbd> to open **Command Palette**.
176
-
1. Type **bicep**, and then select **Import kubernetes Manifest**.
175
+
1. Search for **bicep**, and then select **Bicep: Import Kubernetes Manifest**.
177
176
178
177
:::image type="content" source="./media/quick-kubernetes-deploy-bicep-extensibility-kubernetes-provider/bicep-extensibility-kubernetes-provider-import-kubernetes-manifest.png" alt-text="Screenshot of Visual Studio Code import Kubernetes Manifest":::
179
178
180
-
1. Select **azure-vote.yml** from the prompt. This process creates an **azure-vote.bicep** in the same folder.
181
-
1. Open **azure-vote.bicep**, add the following line at the end of the file to output the load balancer public IP.
179
+
1. Select `azure-vote.yaml` from the prompt. This process creates an `azure-vote.bicep` file in the same folder.
180
+
1. Open `azure-vote.bicep` and add the following line at the end of the file to output the load balancer public IP:
1. Save both **main.bicep** and **azure-vote.bicep**.
203
+
1. Save both `main.bicep` and `azure-vote.bicep`.
205
204
206
205
## Deploy the Bicep file
207
206
@@ -232,7 +231,7 @@ Use the following procedure to add the application definition:
232
231
233
232
It takes a few minutes to create the AKS cluster. Wait for the cluster to be successfully deployed before you move on to the next step.
234
233
235
-
2. From the deployment output, look for the **outputs** section. For example:
234
+
2. From the deployment output, look for the `outputs` section. For example:
236
235
237
236
```json
238
237
"outputs": {
@@ -247,7 +246,7 @@ Use the following procedure to add the application definition:
247
246
},
248
247
```
249
248
250
-
Make a note of the value of lbPublicIp.
249
+
3. Take note of the value of lbPublicIp.
251
250
252
251
## Validate the Bicep deployment
253
252
@@ -259,15 +258,15 @@ To see the Azure Vote app in action, open a web browser to the external IP addre
259
258
260
259
### [Azure CLI](#tab/azure-cli)
261
260
262
-
To avoid Azure charges, if you don't plan on going through the tutorials that follow, clean up your unnecessary resources. Use the [az group delete][az-group-delete] command to remove the resource group, container service, and all related resources.
261
+
To avoid Azure charges, if you don't plan on going through the tutorials that follow, clean up your unnecessary resources. Use the [`az group delete`][az-group-delete] command to remove the resource group, container service, and all related resources.
263
262
264
263
```azurecli-interactive
265
264
az group delete --name myResourceGroup --yes --no-wait
266
265
```
267
266
268
267
### [Azure PowerShell](#tab/azure-powershell)
269
268
270
-
To avoid Azure charges, if you don't plan on going through the tutorials that follow, clean up your unnecessary resources. Use the [Remove-AzResourceGroup][remove-azresourcegroup] cmdlet to remove the resource group, container service, and all related resources.
269
+
To avoid Azure charges, if you don't plan on going through the tutorials that follow, clean up your unnecessary resources. Use the [`Remove-AzResourceGroup`][remove-azresourcegroup] cmdlet to remove the resource group, container service, and all related resources.
> In this quickstart, the AKS cluster was created with a system-assigned managed identity (the default identity option). This identity is managed by the platform and does not require removal.
278
+
> In this quickstart, the AKS cluster was created with a system-assigned managed identity (the default identity option). This identity is managed by the platform and doesn't require removal.
280
279
281
280
## Next steps
282
281
283
282
In this quickstart, you deployed a Kubernetes cluster and then deployed a sample multi-container application to it.
284
283
285
-
To learn more about AKS, and walk through a complete code to deployment example, continue to the Kubernetes cluster tutorial.
284
+
To learn more about AKS, and walk through a complete code to deployment example, continue to the Kubernetes cluster tutorial:
286
285
287
286
> [!div class="nextstepaction"]
288
-
> [AKS tutorial][aks-tutorial]
287
+
> [Kubernetes on Azure tutorial: Prepare an application][aks-tutorial]
0 commit comments