Skip to content

Migrate Kubernetes cluster and let Amazon Elastic Kubernetes Service (EKS) do the heavy lifting.

Notifications You must be signed in to change notification settings

sandyghai/Migrate-Kubernetes-Cluster-To-Amazon-Elastic-Kubernetes-Service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Migrate Kubernetes Cluster To Amazon Elastic Kubernetes Service (EKS)

When it comes to containerized applications, Kubernetes has become an obvious orchestration tool of choice nowadays. If you're learning Kubernetes, and trying to set up a Kubernetes cluster on a local machine use this blog post from AWS. Running Kubernetes on your laptop.

When it comes to a production environment for Kubernetes cluster, we need to ensure zero downtime. Wouldn't it be nice if this was handled and we keep our focus on building applications.

That's where Amazon Elastic Kubernetes Service comes to the rescue!

What does Amazon Elastic Kubernetes Service do?

Amazon Elastic Kubernetes Service (EKS) is a managed Kubernetes service that makes it easy for you to run Kubernetes on AWS and on-premises. With Amazon EKS, you can take advantage of all the performance, scale, reliability, and availability of AWS infrastructure, as well as integrations with AWS networking and security services, such as Application Load Balancers for load distribution, Identity Access Manager (IAM) integration with role-based access control (RBAC), and Virtual Private Cloud (VPC) for pod networking.

Prerequisites And Considerations

There are Prerequisites and considerations to ensure a successful Amazon EKS migration. They are in relation to Security, Networking, Compute Options, Kubernetes Version and Storage. Follow the

Prerequisites and Considerations

Solution

Install And Configure AWS CLI

Install AWS CLI

Configure AWS CLI

Create VPC for EKS cluster

Creating VPC for EKS cluster is easy. Follow the link below and use the CloudFormation Template

Creating a VPC for your Amazon EKS cluster

Record the VPC Id, Subnets and Security Group, we need this information in the next step.

Creating EKS Cluster

The easiest way to create an EKS cluster is via the AWS console. However, you can also use eksctl or aws cli.

Create EKS Cluster

Configure Cluster

configure cluster

When you specify networking for your cluster select Cluster Endpoint access option as Public and private which will allow pods to interact with each other and allow you to add services which will be accessible via the outside world.

specify networking

Configure Logging

configure logging

Review and Create

Update Kube Config

Create backup of original config cp ~/.kube/config  ~/.kube/config-backup

Cluster provisioning takes several minutes. You can query the status of your cluster with the following command or just check via AWS console. Specify --region param for your newly created cluster.

aws eks --region us-east-1 describe-cluster --name kube-cluster-demo --query "cluster.status"

When your cluster status is ACTIVE, you can proceed to run aws cli command to update kubeconfig for your EKS cluster.

aws eks --region us-east-1 update-kubeconfig --name kube-cluster-demo

Adding Nodes to EKS Cluster

Now we need to add some worker nodes to EKS cluster to start running our containers. Use the link below to follow instruction to create managed node group.

Creating a managed node group

You can watch the status of your nodes and wait for them to reach the Ready status before deploying applications.

kubectl get nodes --watch

References

AWS EKS Workshop not only provides you with basics of Kubernetes but also how to run clusters on EKS.

Running Kubernetes on your laptop  helps you set up your laptop for Kubernetes.

Prerequisites and Considerations to perform successful migration

Install AWS CLI

Configure AWS CLI

Creating a VPC for your Amazon EKS cluster

Create EKS Cluster

Staring with Minikube

About

Migrate Kubernetes cluster and let Amazon Elastic Kubernetes Service (EKS) do the heavy lifting.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published