AWS, Azure, Cloud Computing, DevOps

4 Mins Read

Azure AKS to Amazon EKS Migration using Kubernetes Migration Factory

Voiced by Amazon Polly

Introduction

Kubernetes Migration Factory (KMF) is a powerful tool designed to simplify and accelerate the migration of Kubernetes workloads to Amazon EKS. Built with Golang, KMF offers a command-line interface (CLI) that orchestrates and automates complex migration tasks, reducing the process from weeks of manual effort to just minutes.

With minimal input through the CLI, users can configure, launch, and track migration plans for their existing container platforms. KMF scans the source environment, generates a detailed blueprint of running workloads, and lists all the Kubernetes resources to be created on the target Amazon EKS cluster.

The tool understands source platform configurations and automatically adjusts manifest files to ensure compatibility with Amazon EKS. It can also suggest AWS-native services by analyzing existing workloads and recommending equivalent AWS resources. Additionally, KMF provides data plane setup recommendations based on current cluster metadata, making migrations smoother and more efficient.

Pioneers in Cloud Consulting & Migration Services

  • Reduced infrastructural costs
  • Accelerated application deployment
Get Started

Prerequisites

  • Azure AKS Cluster (Source)
  • Amazon EKS Cluster (Destination)
  • Install Go
  • Download Kubernetes Migration Factory – https://github.com/awslabs/aws-kubernetes-migration-factory.git
  • AWS CLI, EKSCTL, and Kubectl tools need to be installed on your workstation
    • For AWS CLI installation, refer to the AWS documentation
    • For EKSCTL installation, refer to the EKSCTL documentation
    • For Kubectl installation, refer to the Kubernetes documentation

Note: Here, we will be using a Virtual Machine (Azure) and an Amazon EC2 Instance to install the prerequisites.

Creating and Managing Azure Kubernetes Service (AKS) Clusters with Application Migration Using Kubernetes Migration Factory (KMF)

Installing Go

Before beginning, ensure Go is installed on your system:

  1. Download Go:

2. Verify the download:

3. Extract the archive:

4. Set Go’s path in your environment:

5. Add the following line to the end of the file:

6. Apply the changes:

7. Verify the installation:

go version

step1

Creating an AKS Cluster

Azure Kubernetes Service (AKS) provides a managed Kubernetes environment that simplifies the deployment and management of containerized applications. To create an AKS cluster:

  1. Follow the official Microsoft documentation at: https://learn.microsoft.com/en-us/azure/aks/learn/quick-kubernetes-deploy-portal?tabs=azure-cli
  2. You can create a cluster using the Azure portal or Azure CLI based on your preference.

Accessing Your AKS Cluster

After creating your AKS cluster, you’ll need to authenticate and configure your environment:

  1. Authenticate to Azure:

This command will provide a URL and passcode to authenticate your Azure account.

Step2

2. Configure kubectl to communicate with your AKS cluster:

This command downloads the kubeconfig file needed to access your cluster.

Setting Up Kubernetes Migration Factory

The Kubernetes Migration Factory (KMF) is a tool designed to streamline the migration of applications to Kubernetes environments.

  1. Clone the repository:

2. Navigate to the project directory:

3. Build the KMF binary:

This builds the binary in the current directory as “containers-migration-factory”.

  1. Alternatively, create a shorter name for the binary:

Troubleshooting Dependencies

If you encounter dependency issues during the build process:

  1. Download dependencies:

2. Tidy up dependencies:

3. Rebuild the project after resolving dependencies.

Deploying Sample Applications

To test your AKS cluster with a sample application:

  1. Follow the Microsoft guide for deploying sample applications: https://learn.microsoft.com/en-us/azure/aks/learn/quick-kubernetes-deploy-portal?tabs=azure-cli
  2. This will walk you through deploying, exposing, and testing a basic application on your new Kubernetes cluster.

Running KMF CLI

Running with a Config config.ini

From the operating system path from where you are making calls to ./bin/kmf, mAKS sure that you have a file with the name config.ini and provide all the required information. A sample config.ini file looks like below:

step3

To access the destination cluster, Update the Kubeconfig of the Amazon EKS cluster from the source cluster.

step3b

Screenshot of k8 resources running on the destination cluster

step3c

Screenshot of k8 resources running on the source cluster

step3d

We can migrate the required resources to the Amazon EKS cluster with the following command.

step3e

Screenshot of the k8 components migrated to destination cluster (Amazon EKS)

step3f

Sample application running as a service as a LoadBalancer

step3g

Conclusion

The Azure Kubernetes Service provides a powerful platform for deploying, managing, and scaling containerized applications. Organizations can streamline their journey to cloud-native architectures with the Kubernetes Migration Factory tool.

This guide has walked through the essential steps for setting up your AKS environment, installing the necessary tools, and preparing for application migration. By following these steps, you will establish a solid foundation for your Kubernetes infrastructure that can support modern application development practices and enable more efficient operations.

Drop a query if you have any questions regarding Azure Kubernetes Service and we will get back to you quickly.

Empowering organizations to become ‘data driven’ enterprises with our Cloud experts.

  • Reduced infrastructure costs
  • Timely data-driven decisions
Get Started

About CloudThat

CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 650k+ professionals in 500+ cloud certifications and completed 300+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training PartnerAWS Migration PartnerAWS Data and Analytics PartnerAWS DevOps Competency PartnerAWS GenAI Competency PartnerAmazon QuickSight Service Delivery PartnerAmazon EKS Service Delivery Partner AWS Microsoft Workload PartnersAmazon EC2 Service Delivery PartnerAmazon ECS Service Delivery PartnerAWS Glue Service Delivery PartnerAmazon Redshift Service Delivery PartnerAWS Control Tower Service Delivery PartnerAWS WAF Service Delivery PartnerAmazon CloudFrontAmazon OpenSearchAWS DMSAWS Systems ManagerAmazon RDS, and many more.

FAQs

1. What version of Go is required for KMF?

ANS: – Go version 1.16 or higher is recommended for building the Kubernetes Migration Factory tool.

2. Can we use AKS with existing Azure resources?

ANS: – Yes, AKS can integrate with existing Azure resources such as Virtual Networks, Azure Monitor, and Azure Active Directory.

WRITTEN BY Deepika N

Deepika N works as a Research Associate - DevOps and holds a Master's in Computer Applications. She is interested in DevOps and technologies. She helps clients to deploy highly available and secured application in AWS. Her hobbies are singing and painting.

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!