I want to know a brief explanation or an example of how to migrate a Kubernetes
application to GCP
from AWS
.
What services are implicated like EKS
or EC2
and GKE
or Compute Engine
.
I'm very new to migration, I don't know too much about AWS
and I recently started using GCP
.
Thanks in advance.
CodePudding user response:
Here is a detailed guide of steps you need to perform to migrate you k8s cluster from AWS to GCP.
https://cloud.google.com/migrate/compute-engine/docs/4.8/how-to/migrate-aws-to-gcp/overview
https://cloud.google.com/migrate/compute-engine/docs/4.8/how-to/migrate-aws-to-gcp/aws-prerequisites
CodePudding user response:
It depends.
AWS
-> GCP
resources mapping
At first, you'll want to know the mapping between AWS
and GCP
resources.
There are several articles:
- Cloud Services Mapping For AWS, Azure, GCP ,OCI, IBM and Alibaba provider – Technology Geek
- Cloud Terminology Glossary for AWS, Azure, and GCP | Lucidchart:
- Cloud Services Terminology Guide: Comparing AWS vs Azure vs Google | CloudHealth by VMware
Migrate AWS EKS
to GCP GKE
If your cluster is deployed with managed kubernetes service:
- from
Elastic Kubernetes Service
(EKS
) - to
Google Kubernetes Engine
(GKE
)
Then it would be hard to migrate. Just due to complexity of kubernetes
architecture and differences in the approaches of manage cluster in AWS
vs
GCP`
Migrate VMs and cluster deployed using your own k8s
manifest.
If your kubernetes
cluster is deployed on cloud virtual machines with k8s
or helm
manifests, then it would be easier.
And there are two ways:
- Either migrate
VM
s usingGCP
Migrate Connector
(as @vicente-ayala said in his answer) - Or import your infrastructure to the
terraform
manifest, change resources definitions step-by-step, and then apply this updated manifest toGCP
Migrating with Migrate Connector
You can found the latest migration manual on migrating VM's here:
Prerequisites
As per GCP
manual,
Before you can migrate a source VM to Google Cloud, you must configure the migration environment on your on-premises data center and on Google Cloud. See:
Migrating
How-to Guides | Migrate for Compute Engine | Google Cloud
Migrating using Terraform
and Terraformer
There is a great tool for reverse Terraform GoogleCloudPlatform/terraformer. Infrastructure to Code
A CLI tool that generates tf
/json
and tfstate
files based on existing infrastructure (reverse Terraform).
And you can import your infrastructure into terraform
manifest:
terraformer import aws --resources=vpc,subnet --connect=true --regions=eu-west-1 --profile=prod
You'll get the terraform
manifest declared with aws provider
And you may try to replace every AWS
resource to the appropriate GCP
resource. There is official terraform GCP
provider: hashicorp/google. Unfortunately, there isn't mapping for terraform
resources of both cloud providers. But, again, you may some of these mapping lists:
- Cloud Services Mapping For AWS, Azure, GCP ,OCI, IBM and Alibaba provider – Technology Geek
- Cloud Terminology Glossary for AWS, Azure, and GCP | Lucidchart:
- Cloud Services Terminology Guide: Comparing AWS vs Azure vs Google | CloudHealth by VMware
And then apply the new GCP
manifest:
terraform init
terraform plan
terraform apply
Additional resources on AWS
<-> GCP
- GCP to AWS Migration: Why and How to Make the Move
- GCP | Google Cloud Migrate for Compute Engine | AWS to GCP Migration using Velostrata - YouTube
- Managing a Large and Complex GCP Migration (Cloud Next '19) - YouTube
- Lessons Learned Migrating from GCP to AWS | Leverege
- How to approach a GCP-to-AWS migration
- How Rapyder helped ride-sharing app migrate from GCP to AWS | Rapyder
- Cloud Migration Use Case: Moving From AWS to GCP (PDF)