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
h1: Migrating from another managed Kubernetes service to Scaleway Kapsule
7
7
paragraph: Step-by-step guide to migrate your Kubernetes clusters from services like GKE, EKS, or AKS to Scaleway Kapsule with minimal downtime.
8
-
tags: pgloader postgresql mysql migration
8
+
tags: kubernetes kapsule k8s migration
9
9
categories:
10
10
- kubernetes
11
11
dates:
12
12
validation: 2024-11-13
13
13
posted: 2024-11-13
14
14
---
15
15
16
-
This guide provides a step-by-step process to help you migrate your existing Kubernetes clusters from other managed services like GKE (Google Kubernetes Engine), EKS (Amazon Elastic Kubernetes Service), or AKS (Azure Kubernetes Service) to **Scaleway Kapsule**. The migration aims to minimize downtime and ensure a smooth transition of your workloads.
16
+
This guide provides a step-by-step process to help you migrate your existing Kubernetes clusters from other managed services like GKE (Google Kubernetes Engine), EKS (Amazon Elastic Kubernetes Service), or AKS (Azure Kubernetes Service) to **[Scaleway Kapsule](/containers/kubernetes/quickstart/)**. The migration aims to minimize downtime and ensure a smooth transition of your workloads.
17
17
18
18
19
19
<Macroid="requirements" />
@@ -23,42 +23,42 @@ This guide provides a step-by-step process to help you migrate your existing Kub
23
23
- Access to an existing Kubernetes cluster
24
24
- Basic knowledge and familiarity with Kubernetes concepts and tools.
25
25
- Installed the following tools: `kubectl`, `helm` (if used), and `scaleway CLI` (optional but recommended).
26
-
-Access to your container images stored in a registry (Scaleway Container Registry, Docker Hub, ECR, GCR, etc.).
26
+
-Access to your container images stored in a registry (Scaleway Container Registry, Docker Hub, ECR, GCR, etc.).
27
27
28
28
## Overview of migration steps
29
29
30
-
1.**Assess and Document Current Cluster Resources**
31
-
2.**Set Up Scaleway Environment**
32
-
3.**Migrate Container Images to Scaleway Container Registry**
33
-
4.**Create a Kapsule Kubernetes Cluster**
34
-
5.**Configure kubectl for Kapsule**
35
-
6.**Adapt Kubernetes Manifests and Configurations**
36
-
7.**Migrate Persistent Data and Storage**
37
-
8.**Deploy Applications to Kapsule**
38
-
9.**Update Networking and DNS Configurations**
39
-
10.**Test and Validate Deployments**
40
-
11.**Switch Over Production Traffic**
41
-
12.**Monitor and Optimize the New Cluster**
42
-
13.**Decommission the Old Cluster**
30
+
-[Step 1: Assess and document current cluster resources](#step-1-assess-and-document-current-cluster-resources)
31
+
-[Step 2: Set up Scaleway environment](#step-2-set-up-scaleway-environment)
32
+
-[Step 3: Migrate container images to Scaleway Container Registry](#step-3-migrate-container-images-to-scaleway-container-registry)
33
+
-[Step 4: Create a Kapsule Kubernetes cluster](#step-4-create-a-kapsule-kubernetes-cluster)
34
+
-[Step 5: Configure kubectl for Kapsule](#step-5-configure-kubectl-for-kapsule)
35
+
-[Step 6: Adapt Kubernetes manifests and configurations](#step-6-adapt-kubernetes-manifests-and-configurations)
36
+
-[Step 7: Migrate persistent data and storage](#step-7-migrate-persistent-data-and-storage)
37
+
-[Step 8: Deploy applications to Kapsule](#step-8-deploy-applications-to-kapsule)
38
+
-[Step 9: Update networking and DNS configurations](#step-9-update-networking-and-dns-configurations)
39
+
-[Step 10: Test and validate deployments](#step-10-test-and-validate-deployments)
40
+
-[Step 11: Switch over production traffic](#step-11-switch-over-production-traffic)
41
+
-[Step 12: Monitor and optimize the new cluster](#step-12-monitor-and-optimize-the-new-cluster)
42
+
-[Step 13: Decommission the old cluster](#step-13-decommission-the-old-cluster)
43
43
44
44
## Step 1: Assess and document current cluster resources
45
45
46
-
Before starting the migration, thoroughly document your existing cluster's configuration.
46
+
Begin by documenting your existing cluster configuration. This includes namespaces, deployments, services, storage, and any custom resources or policies in use.
47
47
48
48
### 1.1 Inventory of resources
49
49
50
50
-**Namespaces**: List all namespaces in use.
51
-
-**Deployments and StatefulSets**: Identify all applications running.
-**ConfigMaps and Secrets**: Export configurations and sensitive data.
54
54
-**Ingress Controllers**: Note any Ingress resources and controllers used.
55
55
-**Persistent Volumes and Claims**: List all storage resources.
56
56
-**Custom Resource Definitions (CRDs)**: Document any CRDs and associated operators.
57
57
-**Network Policies**: Record any network policies in place.
58
58
59
-
### 1.2 Export ùanifests
59
+
### 1.2 Export manifests
60
60
61
-
Use kubectl to export the manifests of your resources:
61
+
Use `kubectl` to export the manifests of your resources:
62
62
63
63
```
64
64
kubectl get all --all-namespaces -o yaml > cluster-resources.yaml
@@ -88,6 +88,7 @@ If you do not already have one, [sign up for a Scaleway account](https://console
88
88
89
89
[Installing the Scaleway CLI](https://github.com/scaleway/scaleway-cli) can simplify some tasks.
90
90
91
+
Run the following command in a terminal to install the Scaleway CLI:
91
92
```sh
92
93
curl -s <https://raw.githubusercontent.com/scaleway/scaleway-cli/master/scripts/get.sh>| sh
93
94
scw init
@@ -109,8 +110,14 @@ Your new cluster will need access to your container images.
109
110
4. Provide a **Name** (e.g., `my-apps`) and select a **Region**.
110
111
5. Click **Create a Namespace**.
111
112
113
+
<Messagetype="note">
114
+
Refer to the dedicated documentation [How to create a namespace](/containers/container-registry/how-to/create-namespace/) for detailed information how to create a Scaleway Container Registry namespace.
115
+
</Message>
116
+
112
117
### 3.2 Authenticate Docker with Scaleway Registry
113
118
119
+
Use the following command to login to your Scaleway Registry using Docker:
To create and configure a new Kapsule Kubernetes cluster, follow the steps below:
154
+
146
155
### 4.1 Using the Scaleway console
147
156
148
-
1. Navigate to **[Kubernetes](https://console.scaleway.com/kubernetes/clusters)** in the Scaleway console.
149
-
2. Click **Create a cluster**.
150
-
3. Configure your cluster:
151
-
152
-
-**Name**: e.g., `production-cluster`.
153
-
-**Region**: Choose the same region as your container registry if possible.
154
-
-**Version**: Select the latest stable Kubernetes version.
155
-
-**Node Pools**:
156
-
- Add node pools matching your workload requirements.
157
-
- Select appropriate **Instance Types** based on CPU, memory, and storage needs.
158
-
-**Autoscaling**: Enable if required.
159
-
-**Networking**:
160
-
-**VPC**: Enable VPC for private networking.
161
-
-**CNI Plugin**: Use the default unless you have specific needs.
162
-
4.**Advanced Options**:
163
-
-**API Server Endpoint Access**: Configure public/private access as needed.
164
-
-**Tags and Labels**: Add any metadata for organization.
165
-
5. Click **Create Cluster**.
157
+
#### Cluster configuration
158
+
159
+
1. Navigate to **Kubernetes** under the **Containers** section of the [Scaleway console](https://console.scaleway.com/) side menu. The Kubernetes dashboard displays.
160
+
2. Click **Create cluster** to launch the cluster creation wizard.
161
+
3. On the cluster configuration page, provide the following details:
162
+
* Check the Organization and Project for the new cluster.
163
+
<Messagetype="important">
164
+
You cannot move a cluster from one Organization or Project to another once created.
165
+
</Message>
166
+
* Select **Kubernetes Kapsule** as the cluster type, which uses exclusively Scaleway Instances.
167
+
* Choose the geographical **region** for the cluster.
168
+
* Select the control plane offer for your cluster. Options include shared or dedicated control planes.
169
+
<Messagetype="tip">
170
+
Need help deciding on a control plane offer? Learn more about our [Kubernetes control plane offers](/containers/kubernetes/reference-content/kubernetes-control-plane-offers/).
171
+
</Message>
172
+
* Specify the **Kubernetes version** for your cluster.
173
+
4. Enter the **cluster's details**. Provide a name for the cluster. Optionally, you can add a description and tags for better organization.
174
+
5. Configure the **Private Network** for the cluster to ensure secure and isolated network communication. Each cluster is auto-configured with a /22 IP subnet. Click **Select Private Network** to:
175
+
* Attach an existing Private Network (VPC) within the same Availability Zone from the drop-down menu.
176
+
* Attach a new Private Network to the cluster.
177
+
<Messagetype="important">
178
+
The Private Network cannot be detached, and the cluster cannot be moved to another Private Network post-creation.
179
+
</Message>
180
+
6. Click **Configure pools** to proceed.
181
+
182
+
#### Pool configuration
183
+
184
+
1. Configure the following for each pool:
185
+
* Choose an **Availability Zone** for the pool's nodes.
186
+
* Select the **node type** for the pool.
187
+
<Messagetype="tip">
188
+
Need advice on choosing a node type? [Learn more about Kubernetes nodes.](/containers/kubernetes/concepts/#node)
189
+
</Message>
190
+
* Configure the **system volume**. This volume contains the operating system of the nodes in your pool.
191
+
* Configure **pool options**, including node count and whether to enable autoscaling. Options also include enabling autoheal and linking to a placement group, or you can retain default settings.
192
+
<Messagetype="tip">
193
+
- Unsure about the autoheal feature? [Learn more about autoheal.](/containers/kubernetes/concepts/#autoheal)
194
+
- Need more information about placement groups? [Learn more about placement groups.](/compute/instances/concepts/#placement-groups)
195
+
</Message>
196
+
* Enable full isolation, if required.
197
+
<Messagetype="tip">
198
+
Need more information on full isolation? [Learn more about full isolation.](/containers/kubernetes/reference-content/secure-cluster-with-private-network/#what-is-the-difference-between-controlled-isolation-and-full-isolation)
199
+
</Message>
200
+
2. Click **Add pool** to integrate the pool into the cluster.
201
+
3. To add more pools, click **Expand** and repeat the steps above.
202
+
<Messagetype="tip">
203
+
You can add or remove pools as needed before finalizing your cluster configuration. To remove a pool, click **Remove** within the respective pool.
204
+
</Message>
205
+
4. Once all pools are configured, click **Review** to finalize your cluster setup.
206
+
207
+
#### Review configuration
208
+
209
+
1. Review the configuration details of your Kubernetes cluster and its pools.
210
+
<Messagetype="tip">
211
+
To modify any element, click the <Iconname="edit" /> **Edit** icon next to the respective configuration component.
212
+
</Message>
213
+
2. Click **Create cluster** to deploy your cluster. Once deployment is complete, the cluster appears in the clusters list.
Configure issuers and certificates as per your requirements.
334
376
335
377
## Step 10: Test and validate deployments
336
378
379
+
Conduct functional, performance, and end-to-end testing to verify the applications work as expected in the new environment.
380
+
337
381
### 10.1 Functional testing
338
382
339
383
- Access your applications via their URLs.
@@ -376,7 +420,7 @@ Configure issuers and certificates as per your requirements.
376
420
377
421
### 12.1 Resource usage
378
422
379
-
- Monitor CPU, memory, and storage usage in [Scaleway Cockpit](add link).
423
+
- Monitor CPU, memory, and storage usage in [Scaleway Cockpit](/observability/cockpit/quickstart/).
380
424
- Adjust node pool sizes or autoscaling settings as needed.
381
425
382
426
### 12.2 Security
@@ -416,24 +460,24 @@ Configure issuers and certificates as per your requirements.
416
460
-**Resource Quotas**: Check for any limitations in Scaleway that may affect deployments.
417
461
-**Persistent Volume Issues**: Ensure storage classes and PVCs are correctly configured.
418
462
-**Networking Problems**: Verify VPC configurations, network policies, and firewall rules.
419
-
-**Image Pull Errors**: Confirm that images are correctly tagged and accessible in Scaleway Container Registry.
463
+
-**Image Pull Errors**: Confirm that images are correctly tagged and accessible in [Scaleway Container Registry]().
420
464
421
465
## Additional considerations
422
466
423
467
### Leveraging Scaleway features
424
468
425
-
-**Elastic Metal nodes**: For workloads requiring dedicated resources, consider adding Elastic Metal nodes to your cluster.
426
-
-**Autoscaling**: Use cluster and pod autoscaling to handle variable workloads efficiently.
427
-
-**Private Networking**: Use VPC and private networks for enhanced security.
469
+
-**Elastic Metal nodes**: For workloads requiring dedicated resources, consider adding [Production-Optimized or Workload-Optimized nodes](/compute/instances/reference-content/choosing-instance-type/) to your cluster.
470
+
-**Autoscaling**: Use cluster and [pod autoscaling](/containers/kubernetes/concepts/#autoscale) to handle variable workloads efficiently.
471
+
-**Private Networking**: Use [VPC and Private Networks](/network/vpc/quickstart/) for enhanced security.
428
472
429
473
### Cost management
430
474
431
-
-**Transparent pricing**: Familiarize yourself with Scaleway's pricing models.
475
+
-**Transparent pricing**: Familiarize yourself with [Scaleway's pricing models](https://www.scaleway.com/en/pricing/containers/#kubernetes-kapsule).
432
476
-**Cost estimation tools**: Use Scaleway's tools or third-party services to estimate and monitor costs.
433
477
434
478
### Security best practices
435
479
436
-
-**IAM policies**: Set up proper access controls.
480
+
-**IAM policies**: Set up proper [access controls]().
437
481
-**Regular updates**: Keep Kubernetes and applications up to date with security patches.
438
482
-**Secrets management**: Use Kubernetes Secrets securely, and consider external secret management solutions if necessary.
439
483
@@ -449,13 +493,13 @@ Configure issuers and certificates as per your requirements.
0 commit comments