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 an award-winning company and the first in India to offer cloud training and consulting services worldwide. As a Microsoft Solutions Partner, AWS Advanced Tier Training Partner, and Google Cloud Platform Partner, CloudThat has empowered over 850,000 professionals through 600+ cloud certifications winning global recognition for its training excellence including 20 MCT Trainers in Microsoft’s Global Top 100 and an impressive 12 awards in the last 8 years. CloudThat specializes in Cloud Migration, Data Platforms, DevOps, IoT, and cutting-edge technologies like Gen AI & AI/ML. It has delivered over 500 consulting projects for 250+ organizations in 30+ countries as it continues to empower professionals and enterprises to thrive in the digital-first world.

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 Senior Research Associate - DevOps and holds a Master's in Computer Applications. She is interested in DevOps and technologies. Deepika has strong expertise in AWS and Azure DevOps, Kubernetes (EKS), Terraform, and CI/CD pipelines. Proficient in infrastructure as code, automation, monitoring, security enforcement, and multi-cloud deployment strategies. Skilled in version control, infrastructure documentation, and cloud-native technologies and handling production workloads, container platforms, and DevSecOps practices.

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!