|
1 | 1 | ---
|
2 | 2 | title: "Move Arc-enabled Kubernetes clusters between regions"
|
3 |
| -ms.date: 03/03/2021 |
| 3 | +ms.date: 12/20/2022 |
4 | 4 | ms.topic: how-to
|
5 | 5 | ms.custom: subject-moving-resources
|
6 |
| -author: anraghun |
7 |
| -ms.author: anraghun |
8 |
| -description: "Manually move your Azure Arc-enabled Kubernetes (or connected cluster resources) between regions." |
9 |
| -#Customer intent: As a Kubernetes cluster administrator, I want to move my Arc-enabled Kubernetes cluster to another Azure region. |
| 6 | +description: "Manually move your Azure Arc-enabled Kubernetes and connected cluster resources between regions." |
10 | 7 | ---
|
11 | 8 |
|
12 | 9 | # Move Arc-enabled Kubernetes clusters across Azure regions
|
13 | 10 |
|
14 |
| -This article describes how to move Arc-enabled Kubernetes clusters (or connected cluster resources) to a different Azure region. You might move your resources to another region for a number of reasons. For example, to take advantage of a new Azure region, to deploy features or services available in specific regions only, to meet internal policy and governance requirements, or in response to capacity planning requirements. |
| 11 | +In some circumstances, you may want to move your [Arc-enabled Kubernetes clusters](overview.md) to another region. For example, you might want to deploy features or services that are only available in specific regions, or you need to change regions due to internal policy and governance requirements or capacity planning considerations. |
| 12 | + |
| 13 | +This article describes how to move Arc-enabled Kubernetes clusters and any connected cluster resources to a different Azure region. |
15 | 14 |
|
16 | 15 | ## Prerequisites
|
17 | 16 |
|
18 |
| -- Ensure that Azure Arc-enabled Kubernetes resource (Microsoft.Kubernetes/connectedClusters) is supported in the target region. |
19 |
| -- Ensure that Azure Arc-enabled Kubernetes configuration (Microsoft.KubernetesConfiguration/SourceControlConfigurations, Microsoft.KubernetesConfiguration/Extensions, Microsoft.KubernetesConfiguration/FluxConfigurations) resources are supported in the target region. |
20 |
| -- Ensure that the Arc-enabled services you've deployed on top are supported in the target region. |
21 |
| -- Ensure you have network access to the api server of your underlying Kubernetes cluster. |
| 17 | +- Ensure that Azure Arc-enabled Kubernetes resources (`Microsoft.Kubernetes/connectedClusters`) are [supported in the target region](https://azure.microsoft.com/explore/global-infrastructure/products-by-region/?products=azure-arc). |
| 18 | +- Ensure that any Azure Arc-enabled Kubernetes configuration resources (`Microsoft.KubernetesConfiguration/SourceControlConfigurations`, `Microsoft.KubernetesConfiguration/Extensions`, `Microsoft.KubernetesConfiguration/FluxConfigurations`) are supported in the target region. |
| 19 | +- Ensure that the Arc-enabled services you've deployed on top of the cluster are supported in the target region. |
| 20 | +- Ensure you have network access to the API server of your underlying Kubernetes cluster. |
22 | 21 |
|
23 | 22 | ## Prepare
|
24 | 23 |
|
25 |
| -Before you begin, it's important to understand what moving these resources mean. |
26 |
| - |
27 |
| -### Kubernetes configurations |
28 |
| - |
29 |
| -Source control configurations, Flux configurations and extensions are child resources to the connected cluster resource. In order to move these resources, you'll first need to move the parent connected cluster resource. |
| 24 | +Before you begin, it's important to understand what moving these resources involves. |
30 | 25 |
|
31 |
| -### Connected cluster |
| 26 | +The `connectedClusters` resource is the Azure Resource Manager representation of a Kubernetes cluster outside of Azure (such as on-premises, another cloud, or edge). The underlying infrastructure lies in your environment, and Azure Arc provides a representation of the cluster on Azure by installing agents on the cluster. |
32 | 27 |
|
33 |
| -The connectedClusters resource is the ARM representation of your Kubernetes clusters outside of Azure (on-premises, another cloud, edge...). The underlying infrastructure lies in your environment and Arc provides a first-class representation of the cluster on Azure, by installing agents on your cluster. |
| 28 | +Moving a connected cluster to a new region means deleting the ARM resource in the source region, cleaning up the agents on your cluster, and then connecting your cluster again in the target region. |
34 | 29 |
|
35 |
| -When it comes to "moving" your Arc connected cluster, it means deleting the ARM resource in the source region, cleaning up the agents on your cluster and re-onboarding your cluster again in the target region. |
| 30 | +Source control configurations, [Flux configurations](conceptual-gitops-flux2.md) and [extensions](conceptual-extensions.md) within the cluster are child resources of the connected cluster resource. To move these resources, you'll need to save details about the resources, then move the parent `connectedClusters` resource. After that, you can recreate the child resources in the target cluster resource. |
36 | 31 |
|
37 | 32 | ## Move
|
38 | 33 |
|
39 |
| -### Kubernetes configurations |
| 34 | +1. Do a LIST to get all configuration resources in the source cluster (the cluster to be moved) and save the response body: |
40 | 35 |
|
41 |
| -1. Do a LIST of all configuration resources in the source cluster (the cluster to be moved) and save the response body to be used as the request body when re-creating these resources. |
42 |
| - - [Microsoft.KubernetesConfiguration/SourceControlConfigurations](/cli/azure/k8s-configuration?view=azure-cli-latest&preserve-view=true#az-k8sconfiguration-list) |
43 |
| - - [Microsoft.KubernetesConfiguration/Extensions](/cli/azure/k8s-extension?view=azure-cli-latest&preserve-view=true#az-k8s-extension-list) |
44 |
| - - [Microsoft.KubernetesConfiguration/FluxConfigurations](/cli/azure/k8s-configuration/flux?view=azure-cli-latest&preserve-view=true#az-k8s-configuration-flux-list) |
45 |
| - > [!NOTE] |
46 |
| - > LIST/GET of configuration resources **do not** return `ConfigurationProtectedSettings`. |
47 |
| - > For such cases, the only option is to save the original request body and reuse them while creating the resources in the new region. |
48 |
| -2. [Delete](./move-regions.md#kubernetes-configurations-3) the above configuration resources. |
49 |
| -2. Ensure the Arc connected cluster is up and running in the new region. This is the target cluster. |
50 |
| -3. Re-create each of the configuration resources obtained in the LIST command from the source cluster on the target cluster. |
| 36 | + - [Microsoft.KubernetesConfiguration/SourceControlConfigurations](/cli/azure/k8s-configuration?view=azure-cli-latest&preserve-view=true#az-k8sconfiguration-list) |
| 37 | + - [Microsoft.KubernetesConfiguration/Extensions](/cli/azure/k8s-extension?view=azure-cli-latest&preserve-view=true#az-k8s-extension-list) |
| 38 | + - [Microsoft.KubernetesConfiguration/FluxConfigurations](/cli/azure/k8s-configuration/flux?view=azure-cli-latest&preserve-view=true#az-k8s-configuration-flux-list) |
51 | 39 |
|
52 |
| -### Connected cluster |
| 40 | + > [!NOTE] |
| 41 | + > LIST/GET of configuration resources **do not** return `ConfigurationProtectedSettings`. For such cases, the only option is to save the original request body and reuse them while creating the resources in the new region. |
53 | 42 |
|
54 |
| -1. [Delete](./move-regions.md#connected-cluster-3) the previous Arc deployment from the underlying Kubernetes cluster. |
55 |
| -2. With network access to the underlying Kubernetes cluster, run [this command](./quickstart-connect-cluster.md?tabs=azure-cli#connect-an-existing-kubernetes-cluster) to create the Arc connected cluster in the new region. |
56 |
| -> [!NOTE] |
57 |
| -> The above command creates the cluster by default in the same location as its resource group. |
58 |
| -> Use the `--location` parameter to explicitly provide the target region value. |
| 43 | +1. [Delete](./move-regions.md#clean-up-source-resources) the previous Arc deployment from the underlying Kubernetes cluster. |
| 44 | +1. With network access to the underlying Kubernetes cluster, run [this command](./quickstart-connect-cluster.md?tabs=azure-cli#connect-an-existing-kubernetes-cluster) to connect that cluster in the new region. |
59 | 45 |
|
60 |
| -## Verify |
| 46 | + > [!NOTE] |
| 47 | + > The above command creates the cluster by default in the same location as its resource group. Use the `--location` parameter to explicitly provide the target region value. |
| 48 | +
|
| 49 | +1. [Verify](#verify) that the Arc connected cluster is successfully running in the new region. This is the target cluster. |
| 50 | +1. Using the response body you saved, recreate each of the configuration resources obtained in the LIST command from the source cluster on the target cluster. |
61 | 51 |
|
62 |
| -### Kubernetes configurations |
| 52 | +If you don't need to move the cluster, but want to move configuration resources to an Arc-enabled Kubernetes cluster in a different region, do the following: |
63 | 53 |
|
64 |
| -Do a LIST of all configuration resources in the target cluster. This should match the LIST response from the source cluster. |
| 54 | +1. Do a LIST to get all configuration resources in the source cluster as noted above, and save the response body. |
| 55 | +1. Delete the resources from the source cluster. |
| 56 | +1. In the target cluster, recreate each of the configuration resources obtained in the LIST command from the source cluster. |
65 | 57 |
|
66 |
| -### Connected cluster |
| 58 | +## Verify |
67 | 59 |
|
68 | 60 | 1. Run `az connectedk8s show -n <connected-cluster-name> -g <resource-group>` and ensure the `connectivityStatus` value is `Connected`.
|
69 |
| -2. Run [this command](./quickstart-connect-cluster.md?tabs=azure-cli#view-azure-arc-agents-for-kubernetes) to verify all Arc agents are successfully deployed on the underlying cluster. |
| 61 | +1. Run [this command](./quickstart-connect-cluster.md?tabs=azure-cli#view-azure-arc-agents-for-kubernetes) to verify all Arc agents are successfully deployed on the underlying cluster. |
| 62 | +1. Do a LIST of all configuration resources in the target cluster. This should match the original LIST response from the source cluster. |
70 | 63 |
|
71 | 64 | ## Clean up source resources
|
72 | 65 |
|
73 |
| -### Kubernetes configurations |
| 66 | +With network access to the underlying Kubernetes cluster, run [this command](./quickstart-connect-cluster.md?tabs=azure-cli#clean-up-resources) to delete the Arc connected cluster. This command deletes the Azure Arc-enabled Kubernetes cluster resource, any associated configuration resources, and any agents running on the cluster. |
| 67 | + |
| 68 | +If you need to delete individual configuration resources in the source cluster without deleting the cluster resource, you can delete these resources individually: |
74 | 69 |
|
75 |
| -Delete each of the configuration resources returned in the LIST command in the source cluster: |
76 | 70 | - [Microsoft.KubernetesConfiguration/SourceControlConfigurations](/cli/azure/k8s-configuration?view=azure-cli-latest&preserve-view=true#az-k8s-configuration-delete)
|
77 | 71 | - [Microsoft.KubernetesConfiguration/Extensions](/cli/azure/k8s-extension?view=azure-cli-latest&preserve-view=true#az-k8s-extension-delete)
|
78 | 72 | - [Microsoft.KubernetesConfiguration/FluxConfigurations](/cli/azure/k8s-configuration/flux?view=azure-cli-latest&preserve-view=true#az-k8s-configuration-flux-delete)
|
79 |
| - |
80 |
| -> [!NOTE] |
81 |
| -> This step may be skipped if the parent Arc connected cluster is also being deleted. Doing so would automatically remove the configuration resources on top. |
82 |
| -
|
83 |
| -### Connected cluster |
84 |
| - |
85 |
| -With network access to the underlying Kubernetes cluster, run [this command](./quickstart-connect-cluster.md?tabs=azure-cli#clean-up-resources) to delete the Arc connected cluster. This command will clean up the Arc footprint on the underlying cluster as well as on ARM. |
0 commit comments