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
title: Migrate from Dapr OSS to the Dapr extension for Azure Kubernetes Service (AKS)
3
+
description: Learn how to migrate from Dapr OSS to the Dapr extension for AKS
4
+
author: hhunter-ms
5
+
ms.author: hannahhunter
6
+
ms.reviewer: nigreenf
7
+
ms.service: container-service
8
+
ms.topic: article
9
+
ms.date: 07/21/2022
10
+
ms.custom: devx-track-azurecli
11
+
---
12
+
13
+
# Migrate from Dapr OSS to the Dapr extension for Azure Kubernetes Service (AKS)
14
+
15
+
You've installed and configured Dapr OSS on your Kubernetes cluster and want to migrate to the Dapr extension on AKS. Before you can successfully migrate to the Dapr extension, you need to fully remove Dapr OSS from your AKS cluster. In this guide, you will migrate from Dapr OSS by:
16
+
17
+
> [!div class="checklist"]
18
+
> - Uninstalling Dapr, including CRDs and the `dapr-system` namespace
19
+
> - Installing Dapr via the Dapr extension for AKS
20
+
> - Applying your components
21
+
> - Restarting your applications that use Dapr
22
+
23
+
> [!NOTE]
24
+
> Expect downtime of approximately 10 minutes while migrating to Dapr extension for AKS. Downtime may take longer depending on varying factors. During this downtime, no Dapr functionality should be expected to run.
25
+
26
+
## Uninstall Dapr
27
+
28
+
#### [Dapr CLI](#tab/cli)
29
+
30
+
1. Run the following command to uninstall Dapr and all CRDs:
31
+
32
+
```bash
33
+
dapr uninstall -k –-all
34
+
```
35
+
36
+
1. Uninstall the Dapr namespace:
37
+
38
+
```bash
39
+
kubectl delete namespace dapr-system
40
+
```
41
+
42
+
> [!NOTE]
43
+
> `dapr-system` is the default namespace installed with `dapr init -k`. If you created a custom namespace, replace `dapr-system` with your namespace.
44
+
45
+
#### [Helm](#tab/helm)
46
+
47
+
1. Run the following command to uninstall Dapr:
48
+
49
+
```bash
50
+
dapr uninstall -k –-all
51
+
```
52
+
53
+
1. Uninstall CRDs:
54
+
55
+
```bash
56
+
kubectl delete crd components.dapr.io
57
+
kubectl delete crd configurations.dapr.io
58
+
kubectl delete crd subscriptions.dapr.io
59
+
kubectl delete crd resiliencies.dapr.io
60
+
```
61
+
62
+
1. Uninstall the Dapr namespace:
63
+
64
+
```bash
65
+
kubectl delete namespace dapr-system
66
+
```
67
+
68
+
> [!NOTE]
69
+
> `dapr-system` is the default namespace while doing a Helm install. If you created a custom namespace (`helm install dapr dapr/dapr --namespace <my-namespace>`), replace `dapr-system` with your namespace.
70
+
71
+
---
72
+
73
+
## Install Dapr via the AKS extension
74
+
75
+
Once you've uninstalled Dapr from your system, install the [Dapr extension for AKS and Arc-enabled Kubernetes](./dapr.md#create-the-extension-and-install-dapr-on-your-aks-or-arc-enabled-kubernetes-cluster).
76
+
77
+
```bash
78
+
az k8s-extension create --cluster-type managedClusters \
79
+
--cluster-name <dapr-cluster-name> \
80
+
--resource-group <dapr-resource-group> \
81
+
--name <dapr-ext> \
82
+
--extension-type Microsoft.Dapr
83
+
```
84
+
85
+
## Apply your components
86
+
87
+
```bash
88
+
kubectl apply -f <component.yaml>
89
+
```
90
+
91
+
## Restart your applications that use Dapr
92
+
93
+
Restarting the deployment will create a new sidecar from the new Dapr installation.
94
+
95
+
```bash
96
+
kubectl rollout restart <deployment-name>
97
+
```
98
+
99
+
## Next steps
100
+
101
+
Learn more about [the cluster extension](./dapr-overview.md) and [how to use it](./dapr.md).
# Dapr extension for Azure Kubernetes Service (AKS) and Arc-enabled Kubernetes
13
13
14
-
[Dapr](https://dapr.io/) is a portable, event-driven runtime that makes it easy for any developer to build resilient, stateless and stateful applications that run on the cloud and edge and embraces the diversity of languages and developer frameworks. Leveraging the benefits of a sidecar architecture, Dapr helps you tackle the challenges that come with building microservices and keeps your code platform agnostic. In particular, it helps with solving problems around services calling other services reliably and securely, building event-driven apps with pub-sub, and building applications that are portable across multiple cloud services and hosts (e.g., Kubernetes vs. a VM).
14
+
[Dapr](https://dapr.io/) is a portable, event-driven runtime that simplifies building resilient, stateless, and stateful applications that run on the cloud and edge and embrace the diversity of languages and developer frameworks. Applying the benefits of a sidecar architecture, Dapr helps you tackle the challenges that come with building microservices and keeps your code platform agnostic. In particular, it helps solve problems around services:
15
+
- Calling other services reliably and securely
16
+
- Building event-driven apps with pub-sub
17
+
- Building applications that are portable across multiple cloud services and hosts (for example, Kubernetes vs. a VM)
15
18
16
19
By using the Dapr extension to provision Dapr on your AKS or Arc-enabled Kubernetes cluster, you eliminate the overhead of downloading Dapr tooling and manually installing and managing the runtime on your AKS cluster. Additionally, the extension offers support for all [native Dapr configuration capabilities][dapr-configuration-options] through simple command-line arguments.
17
20
18
21
> [!NOTE]
19
-
> If you plan on installing Dapr in a Kubernetes production environment, please see the [Dapr guidelines for production usage][kubernetes-production] documentation page.
22
+
> If you plan on installing Dapr in a Kubernetes production environment, see the [Dapr guidelines for production usage][kubernetes-production] documentation page.
20
23
21
24
## How it works
22
25
@@ -25,9 +28,9 @@ The Dapr extension uses the Azure CLI to provision the Dapr control plane on you
25
28
-**dapr-operator**: Manages component updates and Kubernetes services endpoints for Dapr (state stores, pub/subs, etc.)
26
29
-**dapr-sidecar-injector**: Injects Dapr into annotated deployment pods and adds the environment variables `DAPR_HTTP_PORT` and `DAPR_GRPC_PORT` to enable user-defined applications to easily communicate with Dapr without hard-coding Dapr port values.
27
30
-**dapr-placement**: Used for actors only. Creates mapping tables that map actor instances to pods
28
-
-**dapr-sentry**: Manages mTLS between services and acts as a certificate authority. For more information read the [security overview][dapr-security].
31
+
-**dapr-sentry**: Manages mTLS between services and acts as a certificate authority. For more information, read the [security overview][dapr-security].
29
32
30
-
Once Dapr is installed on your cluster, you can begin to develop using the Dapr building block APIs by [adding a few annotations][dapr-deployment-annotations] to your deployments. For a more in-depth overview of the building block APIs and how to best use them, please see the [Dapr building blocks overview][building-blocks-concepts].
33
+
Once Dapr is installed on your cluster, you can begin to develop using the Dapr building block APIs by [adding a few annotations][dapr-deployment-annotations] to your deployments. For a more in-depth overview of the building block APIs and how to best use them, see the [Dapr building blocks overview][building-blocks-concepts].
31
34
32
35
> [!WARNING]
33
36
> If you install Dapr through the AKS or Arc-enabled Kubernetes extension, our recommendation is to continue using the extension for future management of Dapr instead of the Dapr CLI. Combining the two tools can cause conflicts and result in undesired behavior.
@@ -40,7 +43,7 @@ The Dapr extension support varies depending on how you manage the runtime.
40
43
41
44
**Self-managed**
42
45
For self-managed runtime, the Dapr extension supports:
43
-
-[The latest version of Dapr and 2 previous versions (N-2)][dapr-supported-version]
46
+
-[The latest version of Dapr and two previous versions (N-2)][dapr-supported-version]
44
47
- Upgrading minor version incrementally (for example, 1.5 -> 1.6 -> 1.7)
45
48
46
49
Self-managed runtime requires manual upgrade to remain in the support window. To upgrade Dapr via the extension, follow the [Update extension instance instructions][update-extension].
@@ -64,7 +67,7 @@ Global Azure cloud is supported with Arc support on the regions listed by [Azure
64
67
65
68
### Set up the Azure CLI extension for cluster extensions
66
69
67
-
You will need the `k8s-extension` Azure CLI extension. Install this by running the following commands:
70
+
You'll need the `k8s-extension` Azure CLI extension. Install by running the following commands:
68
71
69
72
```azurecli-interactive
70
73
az extension add --name k8s-extension
@@ -83,6 +86,9 @@ When installing the Dapr extension, use the flag value that corresponds to your
> If you're using Dapr OSS on your AKS cluster and would like to install the Dapr extension for AKS, read more about [how to successfully migrate to the Dapr extension][dapr-migration].
91
+
86
92
Create the Dapr extension, which installs Dapr on your AKS or Arc-enabled Kubernetes cluster. For example, for an AKS cluster:
87
93
88
94
```azure-cli-interactive
@@ -135,7 +141,7 @@ If no configuration-settings are passed, the Dapr configuration defaults to:
135
141
allowedClockSkew: 15m
136
142
```
137
143
138
-
For a list of available options, please see [Dapr configuration][dapr-configuration-options].
144
+
For a list of available options, see [Dapr configuration][dapr-configuration-options].
139
145
140
146
## Targeting a specific Dapr version
141
147
@@ -154,9 +160,23 @@ az k8s-extension create --cluster-type managedClusters \
154
160
--version X.X.X
155
161
```
156
162
157
-
## Limiting the extension to certain nodes (`nodeSelector`)
163
+
## Limiting the extension to certain nodes
164
+
165
+
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"`:
166
+
167
+
```azure-cli-interactive
168
+
az k8s-extension create --cluster-type managedClusters \
In some configurations you may only want to run Dapr on certain nodes. This can be accomplished by passing a `nodeSelector` in the extension configuration. Note that 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 `kubernetes.io/os=linux`:
179
+
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:
160
180
161
181
```azure-cli-interactive
162
182
az k8s-extension create --cluster-type managedClusters \
@@ -167,7 +187,8 @@ az k8s-extension create --cluster-type managedClusters \
@@ -184,14 +205,14 @@ az k8s-extension show --cluster-type managedClusters \
184
205
## Update configuration settings
185
206
186
207
> [!IMPORTANT]
187
-
> Some configuration options cannot be modified post-creation. Adjustments to these options require deletion and recreation of the extension. This is applicable to the following settings:
208
+
> Some configuration options cannot be modified post-creation. Adjustments to these options require deletion and recreation of the extension, applicable to the following settings:
188
209
> * `global.ha.*`
189
210
> * `dapr_placement.*`
190
211
191
212
> [!NOTE]
192
213
> High availability (HA) can be enabled at any time. However, once enabled, disabling it requires deletion and recreation of the extension. If you aren't sure if high availability is necessary for your use case, we recommend starting with it disabled to minimize disruption.
193
214
194
-
To update your Dapr configuration settings, simply recreate the extension with the desired state. For example, assume we have previously created and installed the extension using the following configuration:
215
+
To update your Dapr configuration settings, recreate the extension with the desired state. For example, assume we've previously created and installed the extension using the following configuration:
195
216
196
217
```azurecli-interactive
197
218
az k8s-extension create --cluster-type managedClusters \
@@ -204,7 +225,7 @@ az k8s-extension create --cluster-type managedClusters \
0 commit comments