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
+28-85Lines changed: 28 additions & 85 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Quickstart - Deploy Azure applications to Azure Kubernetes Services by us
3
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.
4
4
services: container-service
5
5
ms.topic: quickstart
6
-
ms.date: 01/31/2023
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
@@ -178,6 +178,11 @@ Use the following procedure to add the application definition:
178
178
:::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
179
180
180
1. In the prompt, select **azure-vote.yml**. This process creates an **azure-vote.bicep** in the same folder.
181
+
1. At the end of **azure-vote.bicep**, add the following line to output the load balancer public IP.
1. Save both **main.bicep** and **azure-vote.bicep**.
205
+
193
206
## Deploy the Bicep file
194
207
195
208
1. Deploy the Bicep file using either Azure CLI or Azure PowerShell.
@@ -219,94 +232,24 @@ Use the following procedure to add the application definition:
219
232
220
233
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.
221
234
222
-
## Validate the Bicep deployment
223
-
224
-
### Connect to the cluster
225
-
226
-
To manage a Kubernetes cluster, use the Kubernetes command-line client, [kubectl][kubectl]. `kubectl` is already installed if you use Azure Cloud Shell.
227
-
228
-
### [Azure CLI](#tab/azure-cli)
229
-
230
-
1. Install `kubectl` locally using the [az aks install-cli][az-aks-install-cli] command:
231
-
232
-
```azurecli
233
-
az aks install-cli
234
-
```
235
-
236
-
2. Configure `kubectl` to connect to your Kubernetes cluster using the [az aks get-credentials][az-aks-get-credentials] command. This command downloads credentials and configures the Kubernetes CLI to use them.
237
-
238
-
```azurecli-interactive
239
-
az aks get-credentials --resource-group myResourceGroup --name myAKSCluster
240
-
```
241
-
242
-
3. Verify the connection to your cluster using the [kubectl get][kubectl-get] command. This command returns a list of the cluster nodes.
243
-
244
-
```console
245
-
kubectl get nodes
246
-
```
247
-
248
-
The following output example shows the three nodes created in the previous steps. Make sure the node status is *Ready*:
1. Install `kubectl` locally using the [Install-AzAksKubectl][install-azakskubectl] cmdlet:
260
-
261
-
```azurepowershell
262
-
Install-AzAksKubectl
263
-
```
264
-
265
-
2. Configure `kubectl` to connect to your Kubernetes cluster using the [Import-AzAksCredential][import-azakscredential] cmdlet. The following cmdlet downloads credentials and configures the Kubernetes CLI to use them.
235
+
2. From the deployment output, look for the **outputs** section. For example:
Once the **EXTERNAL-IP** address changes from *pending* to an actual public IP address, use `CTRL-C` to stop the `kubectl` watch process. The following example output shows a valid public IP address assigned to the service:
@@ -13,152 +13,50 @@ Learn how to Bicep extensibility Kubernetes provider to deploy .NET applications
13
13
14
14
This preview feature can be enabled by configuring the [bicepconfig.json](./bicep-config.md):
15
15
16
-
```bicep
16
+
```json
17
17
{
18
18
"experimentalFeaturesEnabled": {
19
19
"extensibility": true,
20
20
}
21
21
}
22
22
```
23
23
24
-
## Import schema for Kubernetes provider
24
+
## Import Kubernetes provider
25
+
26
+
Deployments of Kubernetes must be contained within a [Bicep module file](./modules.md). To import the Kubernetes provider, use the [import statement](./bicep-import-providers.md). After importing the provider, you can refactor the Bicep module file as usual, such as by using variables and parameters. The Kubernetes manifest in YML does not include any programmability support by contract.
25
27
26
-
Use the following syntax to import schema for Kubernetes provider:
28
+
The following sample imports the Kubernetes provider:
27
29
28
30
```bicep
29
-
resource aks 'Microsoft.ContainerService/managedClusters@2022-05-02-preview' existing = {
The AKS cluster can be a new resource or an existing resource. The [Import Kubernetes manifest command](./visual-studio-code.md#bicep-commands) from Visual Studio Code can automatically add the code snippet automatically.
40
-
41
-
## Define Kubernetes deployments and services
42
-
43
-
*** Do I need to cover how a Kubernetes YML is transformed into Bicep?
44
-
45
-
```yml
46
-
apiVersion: apps/v1
47
-
kind: Deployment
48
-
metadata:
49
-
name: azure-vote-back
50
-
spec:
51
-
replicas: 1
52
-
selector:
53
-
matchLabels:
54
-
app: azure-vote-back
55
-
template:
56
-
metadata:
57
-
labels:
58
-
app: azure-vote-back
59
-
spec:
60
-
nodeSelector:
61
-
"kubernetes.io/os": linux
62
-
containers:
63
-
- name: azure-vote-back
64
-
image: mcr.microsoft.com/oss/bitnami/redis:6.0.8
65
-
env:
66
-
- name: ALLOW_EMPTY_PASSWORD
67
-
value: "yes"
68
-
resources:
69
-
requests:
70
-
cpu: 100m
71
-
memory: 128Mi
72
-
limits:
73
-
cpu: 250m
74
-
memory: 256Mi
75
-
ports:
76
-
- containerPort: 6379
77
-
name: redis
78
-
---
79
-
apiVersion: v1
80
-
kind: Service
81
-
metadata:
82
-
name: azure-vote-back
83
-
spec:
84
-
ports:
85
-
- port: 6379
86
-
selector:
87
-
app: azure-vote-back
88
-
```
40
+
-**namespace**: Specify the namespace of the provider.
41
+
-**KubeConfig**: Specify a base64 encoded value of the [Kubernetes cluster admin credentials](/rest/api/aks/managed-clusters/list-cluster-admin-credentials).
42
+
43
+
The following sample shows how to pass `kubeConfig` value from parent Bicep file:
The AKS cluster can be a new resource or an existing resource. The [Import Kubernetes manifest command](./visual-studio-code.md#bicep-commands) from Visual Studio Code can automatically add the import snippet automatically.
59
+
162
60
## Visual Studio Code import
163
61
164
62
From Visual Studio Code, you can import Kubernetes manifest files to create Bicep module files. For more information, see [Visual Studio Code](./visual-studio-code.md#bicep-commands)
description: Describes how to import Bicep extensibility providers.
4
+
ms.topic: conceptual
5
+
ms.date: 02/03/2023
6
+
---
7
+
8
+
# Import Bicep extensibility providers
9
+
10
+
This article describes the syntax you use to import Bicep extensibility providers.
11
+
12
+
## Import providers
13
+
14
+
The syntax for importing providers is:
15
+
16
+
```bicep
17
+
import '<provider-name>@<provider-version>' with {
18
+
<provider-properties>
19
+
}
20
+
```
21
+
22
+
See [Bicep extensibility Kubernetes provider](./bicep-extensibility-kubernetes-provider.md) for an example of using the Import statement.
23
+
24
+
## Next steps
25
+
26
+
- To learn about how to use the Kubernetes provider, see [Bicep extensibility Kubernetes provider](./bicep-extensibility-kubernetes-provider.md).
27
+
- To go through a Kubernetes provider tutorial, see [Quickstart - Deploy Azure applications to Azure Kubernetes Services by using Bicep Kubernetes provider.](../../aks/learn/quick-kubernetes-deploy-bicep-extensibility-kubernetes-provider.md).
0 commit comments