Skip to content

Commit dee3bff

Browse files
authored
Merge pull request #197490 from anraghun/regionmove
Region move initial commit
2 parents 4c5adb1 + ae0802b commit dee3bff

File tree

2 files changed

+90
-0
lines changed

2 files changed

+90
-0
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: "Move Arc-enabled Kubernetes clusters between regions"
3+
services: azure-arc
4+
ms.service: azure-arc
5+
ms.date: 03/03/2021
6+
ms.topic: how-to
7+
ms.custom: subject-moving-resources
8+
author: anraghun
9+
ms.author: anraghun
10+
description: "Manually move your Azure Arc-enabled Kubernetes between regions"
11+
keywords: "Kubernetes, Arc, Azure, K8s, containers, region, move"
12+
#Customer intent: As a Kubernetes cluster administrator, I want to move my Arc-enabled Kubernetes cluster to another Azure region.
13+
---
14+
15+
# Move Arc-enabled Kubernetes clusters across Azure regions
16+
17+
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.
18+
19+
## Prerequisites
20+
21+
- Ensure that Azure Arc-enabled Kubernetes resource (Microsoft.Kubernetes/connectedClusters) is supported in the target region.
22+
- Ensure that Azure Arc-enabled Kubernetes configuration (Microsoft.KubernetesConfiguration/SourceControlConfigurations, Microsoft.KubernetesConfiguration/Extensions, Microsoft.KubernetesConfiguration/FluxConfigurations) resources are supported in the target region.
23+
- Ensure that the Arc-enabled services you've deployed on top are supported in the target region.
24+
- Ensure you have network access to the api server of your underlying Kubernetes cluster.
25+
26+
## Prepare
27+
28+
Before you begin, it's important to understand what moving these resources mean.
29+
30+
### Kubernetes configurations
31+
32+
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.
33+
34+
### Connected cluster
35+
36+
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.
37+
38+
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.
39+
40+
## Move
41+
42+
### Kubernetes configurations
43+
44+
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.
45+
- [Microsoft.KubernetesConfiguration/SourceControlConfigurations](/cli/azure/k8s-configuration?view=azure-cli-latest&preserve-view=true#az-k8sconfiguration-list)
46+
- [Microsoft.KubernetesConfiguration/Extensions](/cli/azure/k8s-extension?view=azure-cli-latest&preserve-view=true#az-k8s-extension-list)
47+
- [Microsoft.KubernetesConfiguration/FluxConfigurations](/cli/azure/k8s-configuration/flux?view=azure-cli-latest&preserve-view=true#az-k8s-configuration-flux-list)
48+
> [!NOTE]
49+
> LIST/GET of configuration resources **do not** return `ConfigurationProtectedSettings`.
50+
> For such cases, the only option is to save the original request body and reuse them while creating the resources in the new region.
51+
2. [Delete](./move-regions.md#kubernetes-configurations-3) the above configuration resources.
52+
2. Ensure the Arc connected cluster is up and running in the new region. This is the target cluster.
53+
3. Re-create each of the configuration resources obtained in the LIST command from the source cluster on the target cluster.
54+
55+
### Connected cluster
56+
57+
1. [Delete](./move-regions.md#connected-cluster-3) the previous Arc deployment from the underlying Kubernetes cluster.
58+
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.
59+
> [!NOTE]
60+
> The above command creates the cluster by default in the same location as its resource group.
61+
> Use the `--location` parameter to explicitly provide the target region value.
62+
63+
## Verify
64+
65+
### Kubernetes configurations
66+
67+
Do a LIST of all configuration resources in the target cluster. This should match the LIST response from the source cluster.
68+
69+
### Connected cluster
70+
71+
1. Run `az connectedk8s show -n <connected-cluster-name> -g <resource-group>` and ensure the `connectivityStatus` value is `Connected`.
72+
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.
73+
74+
## Clean up source resources
75+
76+
### Kubernetes configurations
77+
78+
Delete each of the configuration resources returned in the LIST command in the source cluster:
79+
- [Microsoft.KubernetesConfiguration/SourceControlConfigurations](/cli/azure/k8s-configuration?view=azure-cli-latest&preserve-view=true#az-k8s-configuration-delete)
80+
- [Microsoft.KubernetesConfiguration/Extensions](/cli/azure/k8s-extension?view=azure-cli-latest&preserve-view=true#az-k8s-extension-delete)
81+
- [Microsoft.KubernetesConfiguration/FluxConfigurations](/cli/azure/k8s-configuration/flux?view=azure-cli-latest&preserve-view=true#az-k8s-configuration-flux-delete)
82+
83+
> [!NOTE]
84+
> 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.
85+
86+
### Connected cluster
87+
88+
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.

articles/azure-arc/kubernetes/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@
105105
href: custom-locations.md
106106
- name: Azure Arc-enabled Machine Learning
107107
href: ../../machine-learning/how-to-attach-kubernetes-anywhere.md?toc=/azure/azure-arc/kubernetes/toc.json&bc=/azure/azure-arc/kubernetes/breadcrumb/toc.json
108+
- name: Move between regions
109+
href: move-regions.md
108110
- name: Troubleshooting
109111
href: troubleshooting.md
110112
- name: Reference

0 commit comments

Comments
 (0)