Skip to content

Commit 76d5c24

Browse files
Merge pull request #270418 from hhunter-ms/hh-231357
[Dapr/AKS] Add instructions and zone pivots for ARM/Bicep deployment
2 parents e0f9dcc + 6d5dfe6 commit 76d5c24

File tree

5 files changed

+297
-33
lines changed

5 files changed

+297
-33
lines changed

articles/aks/dapr-overview.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Dapr extension for Azure Kubernetes Service (AKS) overview
33
description: Learn more about using Dapr on your Azure Kubernetes Service (AKS) cluster to develop applications.
44
ms.author: nickoman
55
ms.topic: article
6-
ms.date: 07/07/2023
6+
ms.date: 03/28/2024
77
---
88

99
# Dapr
@@ -21,6 +21,14 @@ Dapr is incrementally adoptable. You can use any of the API building blocks as n
2121

2222
## Capabilities and features
2323

24+
[Using the Dapr extension to provision Dapr on your AKS or Arc-enabled Kubernetes cluster](../azure-arc/kubernetes/conceptual-extensions.md) eliminates the overhead of:
25+
- Downloading Dapr tooling
26+
- Manually installing and managing the Dapr runtime on your AKS cluster
27+
28+
[You can install, deploy, and configure the Dapr extension on your cluster using either the Azure CLI or a Bicep template.](./dapr.md)
29+
30+
Additionally, the extension offers support for all [native Dapr configuration capabilities][dapr-configuration-options] through simple command-line arguments.
31+
2432
Dapr provides the following set of capabilities to help with your microservice development on AKS:
2533

2634
- Easy provisioning of Dapr on AKS through [cluster extensions][cluster-extensions].
@@ -98,6 +106,7 @@ After learning about Dapr and some of the challenges it solves, try [Deploying a
98106
[dapr-quickstart]: ./quickstart-dapr.md
99107
[dapr-migration]: ./dapr-migration.md
100108
[aks-msi]: ./use-managed-identity.md
109+
[dapr-configuration-options]: ./dapr-settings.md
101110

102111
<!-- Links External -->
103112
[dapr-docs]: https://docs.dapr.io/

articles/aks/dapr-settings.md

Lines changed: 136 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: hannahhunter
66
ms.topic: article
77
ms.custom: build-2023, devx-track-azurecli, linux-related-content
88
ms.subservice: aks-developer
9-
ms.date: 06/08/2023
9+
ms.date: 04/01/2024
1010
---
1111

1212
# Configure the Dapr extension for your Azure Kubernetes Service (AKS) and Arc-enabled Kubernetes project
@@ -17,7 +17,13 @@ Once you've [created the Dapr extension](./dapr.md), you can configure the [Dapr
1717
- Setting automatic CRD updates
1818
- Configuring the Dapr release namespace
1919

20-
The extension enables you to set Dapr configuration options by using the `--configuration-settings` parameter. For example, to provision Dapr with high availability (HA) enabled, set the `global.ha.enabled` parameter to `true`:
20+
The extension enables you to set Dapr configuration options by using the `--configuration-settings` parameter in the Azure CLI or `configurationSettings` property in a Bicep template.
21+
22+
## Provision Dapr with high availability (HA) enabled
23+
24+
Provision Dapr with high availability (HA) enabled by setting the `global.ha.enabled` parameter to `true`.
25+
26+
# [Azure CLI](#tab/cli)
2127

2228
```azurecli
2329
az k8s-extension create --cluster-type managedClusters \
@@ -31,7 +37,22 @@ az k8s-extension create --cluster-type managedClusters \
3137
```
3238

3339
> [!NOTE]
34-
> If configuration settings are sensitive and need to be protected, for example cert related information, pass the `--configuration-protected-settings` parameter and the value will be protected from being read.
40+
> If configuration settings are sensitive and need to be protected (for example, cert-related information), pass the `--configuration-protected-settings` parameter and the value will be protected from being read.
41+
42+
# [Bicep](#tab/bicep)
43+
44+
```bicep
45+
properties: {
46+
configurationSettings: {
47+
'global.ha.enabled': true
48+
}
49+
}
50+
```
51+
52+
> [!NOTE]
53+
> If configuration settings are sensitive and need to be protected (for example, cert-related information), use the `configurationProtectedSettings` property and the value will be protected from being read.
54+
55+
---
3556

3657
If no configuration-settings are passed, the Dapr configuration defaults to:
3758

@@ -55,7 +76,9 @@ For a list of available options, see [Dapr configuration][dapr-configuration-opt
5576
5677
## Limit the extension to certain nodes
5778
58-
In some configurations, you may only want to run Dapr on certain nodes. You can limit the extension by passing a `nodeSelector` in the extension configuration. If the desired `nodeSelector` contains `.`, you must escape them from the shell and the extension. For example, the following configuration will install Dapr to only nodes with `topology.kubernetes.io/zone: "us-east-1c"`:
79+
In some configurations, you may only want to run Dapr on certain nodes. You can limit the extension by passing a `nodeSelector` in the extension configuration. If the desired `nodeSelector` contains `.`, you must escape them from the shell and the extension. For example, the following configuration installs Dapr only to nodes with `topology.kubernetes.io/zone: "us-east-1c"`:
80+
81+
# [Azure CLI](#tab/cli)
5982

6083
```azurecli
6184
az k8s-extension create --cluster-type managedClusters \
@@ -84,9 +107,37 @@ az k8s-extension create --cluster-type managedClusters \
84107
--configuration-settings "global.daprControlPlaneArch=amd64”
85108
```
86109

110+
# [Bicep](#tab/bicep)
111+
112+
```bicep
113+
properties: {
114+
configurationSettings: {
115+
'global.clusterType': 'managedclusters'
116+
'global.ha.enabled': true
117+
'global.nodeSelector.kubernetes\.io/zone': 'us-east-1c'
118+
119+
}
120+
}
121+
```
122+
123+
For managing OS and architecture, use the [supported versions](https://github.com/dapr/dapr/blob/b8ae13bf3f0a84c25051fcdacbfd8ac8e32695df/docker/docker.mk#L50) of the `global.daprControlPlaneOs` and `global.daprControlPlaneArch` configuration:
124+
125+
```bicep
126+
properties: {
127+
configurationSettings: {
128+
'global.clusterType': 'managedclusters'
129+
'global.ha.enabled': true
130+
'global.daprControlPlaneOs': 'linux'
131+
'global.daprControlPlaneArch': 'amd64'
132+
}
133+
}
134+
```
135+
136+
---
137+
87138
## Install Dapr in multiple availability zones while in HA mode
88139

89-
By default, the placement service uses a storage class of type `standard_LRS`. It is recommended to create a `zone redundant storage class` while installing Dapr in HA mode across multiple availability zones. For example, to create a `zrs` type storage class:
140+
By default, the placement service uses a storage class of type `standard_LRS`. It is recommended to create a **zone redundant storage class** while installing Dapr in HA mode across multiple availability zones. For example, to create a `zrs` type storage class, add the `storageaccounttype` parameter:
90141

91142
```yaml
92143
kind: StorageClass
@@ -101,7 +152,9 @@ parameters:
101152
storageaccounttype: Premium_ZRS
102153
```
103154

104-
When installing Dapr, use the above storage class:
155+
When installing Dapr, use the storage class you used in the YAML file:
156+
157+
# [Azure CLI](#tab/cli)
105158

106159
```azurecli
107160
az k8s-extension create --cluster-type managedClusters
@@ -114,9 +167,26 @@ az k8s-extension create --cluster-type managedClusters
114167
--configuration-settings "dapr_placement.volumeclaims.storageClassName=custom-zone-redundant-storage"
115168
```
116169

170+
# [Bicep](#tab/bicep)
171+
172+
```bicep
173+
properties: {
174+
configurationSettings: {
175+
'dapr_placement.volumeclaims.storageClassName': 'custom-zone-redundant-storage'
176+
'global.ha.enabled': true
177+
}
178+
}
179+
```
180+
181+
---
182+
117183
## Configure the Dapr release namespace
118184

119-
You can configure the release namespace. The Dapr extension gets installed in the `dapr-system` namespace by default. To override it, use `--release-namespace`. Include the cluster `--scope` to redefine the namespace.
185+
You can configure the release namespace.
186+
187+
# [Azure CLI](#tab/cli)
188+
189+
The Dapr extension gets installed in the `dapr-system` namespace by default. To override it, use `--release-namespace`. Include the cluster `--scope` to redefine the namespace.
120190

121191
```azurecli
122192
az k8s-extension create \
@@ -132,6 +202,22 @@ az k8s-extension create \
132202
--release-namespace dapr-custom
133203
```
134204

205+
# [Bicep](#tab/bicep)
206+
207+
The Dapr extension gets installed in the `dapr-system` namespace by default. To override it, use `releaseNamespace` in the cluster `scope` to redefine the namespace.
208+
209+
```bicep
210+
properties: {
211+
scope: {
212+
cluster: {
213+
releaseNamespace: 'dapr-custom'
214+
}
215+
}
216+
}
217+
```
218+
219+
---
220+
135221
[Learn how to configure the Dapr release namespace if you already have Dapr installed](./dapr-migration.md).
136222

137223
## Show current configuration settings
@@ -192,6 +278,8 @@ If you want to use an outbound proxy with the Dapr extension for AKS, you can do
192278

193279
## Updating your Dapr installation version
194280

281+
# [Azure CLI](#tab/cli)
282+
195283
If you are on a specific Dapr version and you don't have `--auto-upgrade-minor-version` available, you can use the following command to upgrade or downgrade Dapr:
196284

197285
```azurecli
@@ -202,6 +290,18 @@ az k8s-extension update --cluster-type managedClusters \
202290
--version 1.12.0 # Version to upgrade or downgrade to
203291
```
204292

293+
# [Bicep](#tab/bicep)
294+
295+
If you are on a specific Dapr version and you don't have `autoUpgradeMinorVersion` available, you can use the following Bicep property to upgrade or downgrade Dapr:
296+
297+
```bicep
298+
properties: {
299+
version: '1.12.0'
300+
}
301+
```
302+
303+
---
304+
205305
The preceding command updates the Dapr control plane *only.* To update the Dapr sidecars, restart your application deployments:
206306

207307
```bash
@@ -210,7 +310,9 @@ kubectl rollout restart deploy/<DEPLOYMENT-NAME>
210310

211311
## Using Azure Linux-based images
212312

213-
From Dapr version 1.8.0, you can use Azure Linux images with the Dapr extension. To use them, set the`global.tag` flag:
313+
From Dapr version 1.8.0, you can use Azure Linux images with the Dapr extension. To use them, set the `global.tag` flag:
314+
315+
# [Azure CLI](#tab/cli)
214316

215317
```azurecli
216318
az k8s-extension update --cluster-type managedClusters \
@@ -220,13 +322,25 @@ az k8s-extension update --cluster-type managedClusters \
220322
--set global.tag=1.10.0-mariner
221323
```
222324

325+
# [Bicep](#tab/bicep)
326+
327+
```bicep
328+
properties: {
329+
global.tag: '1.10.0-mariner'
330+
}
331+
```
332+
333+
---
334+
223335
- [Learn more about using Mariner-based images with Dapr][dapr-mariner].
224-
- [Learn more about deploying AzureLinux on AKS][aks-azurelinux].
336+
- [Learn more about deploying Azure Linux on AKS][aks-azurelinux].
225337

226338

227339
## Disable automatic CRD updates
228340

229-
With Dapr version 1.9.2, CRDs are automatically upgraded when the extension upgrades. To disable this setting, you can set `hooks.applyCrds` to `false`.
341+
From Dapr version 1.9.2, CRDs are automatically upgraded when the extension upgrades. To disable this setting, you can set `hooks.applyCrds` to `false`.
342+
343+
# [Azure CLI](#tab/cli)
230344

231345
```azurecli
232346
az k8s-extension update --cluster-type managedClusters \
@@ -236,6 +350,18 @@ az k8s-extension update --cluster-type managedClusters \
236350
--configuration-settings "hooks.applyCrds=false"
237351
```
238352

353+
# [Bicep](#tab/bicep)
354+
355+
```bicep
356+
properties: {
357+
configurationSettings: {
358+
'hooks.applyCrds': false
359+
}
360+
}
361+
```
362+
363+
---
364+
239365
> [!NOTE]
240366
> CRDs are only applied in case of upgrades and are skipped during downgrades.
241367

articles/aks/dapr-workflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ Notice that the workflow status is marked as completed.
192192
[install-cli]: /cli/azure/install-azure-cli
193193
[k8s-ext]: ./dapr.md#set-up-the-azure-cli-extension-for-cluster-extensions
194194
[cluster]: ./tutorial-kubernetes-deploy-cluster.md
195-
[k8s-sp]: ./dapr.md#register-the-kubernetesconfiguration-service-provider
195+
[k8s-sp]: ./dapr.md#register-the-kubernetesconfiguration-resource-provider
196196
[dapr-config]: ./dapr-settings.md
197197
[az-cloud-shell]: ./learn/quick-kubernetes-deploy-powershell.md#azure-cloud-shell
198198
[kubectl]: ./tutorial-kubernetes-deploy-cluster.md#connect-to-cluster-using-kubectl

0 commit comments

Comments
 (0)