A Quick Guide On How To Deep Dive Into Amazon Eks

Last year, we saw many developers found value in running Kubernetes on AWS. A CNCF survey confirmed that over 60% of Kubernetes workloads ran on AWS. To support this vast ecosystem of developers’ needs, AWS released a new service called Amazon EKS (Amazon Elastic Container Service for Kubernetes) at re:Invent 2017. This new service helps run Kubernetes open source container management framework, at scale, on AWS.

AWS EKS Demo

This article will cover the ‘Kubernetes on AWS’ world before and after EKS was released.

The Love for Kubernetes and AWS’ Move to Support it

It all started with the developer community extensively using Kubernetes.This was because Kubernetes has the tools that are required to solve modern application problems. It can run anywhere, either on a laptop in the form of Minikube, on-premise, or on the cloud. Kubernetes API is extremely powerful. This API can be thought of as like a single abstraction layer that can help abstract resources both within AWS and on-premise.

The Case: Kubernetes on AWS Before EKS

While using Kubernetes on AWS, a user can take advantage of the underlying platform. Like he/she can get all the performance, the reliability, the breadth of features that come with AWS via Kubernetes cloud integrations. But a user can also use that same familiar API on premise or on a laptop. Thus, Kubernetes makes it easy while developing and moving things to the cloud when ready. Above all, it has a really amazing and enthusiastic developer community.

The capability to deploy cloud-native applications: All the functionality of Kubernetes that comes with package are actually building blocks for cloud native applications. All the functionalities that are available in the Kubernetes package supports microservices and cloud native apps.

AWS EKS Demo

And it’s always critical where Kubernetes clusters run.

AWS EKS Demo

Factors like the quality of the underlying platform and other dynamics like the speed, stability, scalability and the integrations within the platform impact how much effort a user has to put in to build an application on Kubernetes.

If there’s something nice on the shelf or off the shelf with AWS, that a user wants to use, they can can do that in Kubernetes. He/she need not implement load balancer every time. They can just use a native version available in AWS.

Here’s a quick walk through on how to deploy Kubernetes cluster on AWS.

Below is the typical architecture diagram of Kubernetes Cluster on AWS.

AWS EKS Demo

This is a natural deployment pattern, where a user can run masters and ETCDs across three AZ’s for HA control panel. Each Kubernetes master essentially runs a copy of the same components. In addition to the masters, a user can also run ETCD, which is the core persistence layer for Kubernetes.

It is here where all the critical data of a cluster lives. Guarding these clusters is essential. Finally, a user needs to run the actual worker nodes where the applications run. These applications can be deployed in auto-scaling groups across multiple availability zones. This requires a lot of control over the instance type, however, a user can use on-demand, reserved instances and whatever instance type that’s pertinent.

The Case: Kubernetes on AWS After EKS

Before EKS, a lot of failovers occurred and developers had a hard time. Hence, AWS built EKS. With this new service developers need not worry about deploying Kubernetes cluster or think about configuration management, ETCD clusters, and master’s high-availability.

What’s in store for users?

Developers using AWS always expect top-notch AWS integration. Today’s developers want to take advantage of the breadth of the AWS platform. On the other hand, there are AWS resources that are supported well in Kubernetes, but not everything.

Hence the EKS. According to AWS, EKS is a platform for enterprises to run production-grade workloads.

To elucidate further, EKS provides features and management capabilities that allow enterprises to run real workloads at real scale. It provides a native and upstream Kubernetes experience. So any modifications or improvements made at the back end, perhaps in building service, will be transparent to the Kubernetes end user experience.

If EKS customers want to use additional AWS services, the integrations are seamless. Moreover, it eliminates undifferentiated heavy lifting.

AWS EKS Demo

Further with EKS, master and ETCD will be managed by AWS and the worker nodes will be taken care by the users.

So, in the end, it will look like this.

AWS EKS Demo

What’s noticeable is that the complete control panel is really simplified. So, instead of running the Kubernetes control panel from a user’s account, a user can connect to Manage Kubernetes endpoint in the AWS cloud.

The endpoint abstracts the complexity of the Kubernetes Control panel and the worker nodes check in to this endpoint. A user can interact with kubectl with this endpoint and replace all the complexity of running his/her Kubernetes Control panel.

A Step-by-Step Guide to Creating a Kubernetes cluster in AWS Console using EKS

Here’s a quick walk through on how to create a Kubernetes cluster in AWS Console using EKS.

1. Open the EKS preview page as shown below:

AWS EKS Demo


A page opens where the user needs to fill cluster name, K8S version, VPC-ID and Role ARN.

AWS EKS Demo

Note: Currently, EKS supports Kubernetes 1.7.

2. Key in VPC ID. VPC tells us where the worker nodes will run in a user account and where a user needs to create resources in their account.

3. Key in the Role ARN. The IAM role ARN used by EKS manages resources in a user’s account for the Kubernetes master.

4. Click on Create to launch a Kubernetes cluster. This will take approximately 6 to 7 minutes to setup a K8S cluster. The Master endpoint is ready once the cluster is up and running.

AWS EKS Demo

5. Copy the master endpoint and put it in .kube/config of home directory as shown below:

AWS EKS Demo

6. Deploy the pods here.

Command Line Support

Amazon EKS also provides AWS CLI commands to perform operations with EKS cluster.

If a user wants to create a cluster then he/she can use the below command line:

AWS EKS Demo

If a user wants to describe cluster details and get the metadata, he/she can use the below command line.

AWS EKS Demo

The cluster metadata will look like this:

AWS EKS Demo

To list the clusters, use the below command line.

AWS EKS Demo

To delete the clusters, use the below command line.

AWS EKS Demo

EKS Master Visibility

EKS provides all API logs to CloudTrail. When a user calls eks create-cluster, this will go into CloudTrail. Just like any other AWS service, all the logs based on API layer will be in CloudTrail. But there are a bunch of other stuff that happens on the masters. Things like kube-api server logs, the kube-scheduler logs, the kube-controller manager logs, etc. will be available in CloudWatch logs so that a user can aggregate the logs (like ELK stack) and monitor them.

AWS EKS Demo

Additionally, a user can also install Kube Add-ons on worker nodes.

EKS also provides an additional layer of Authentication with AWS IAM. The below diagram explains it all.

AWS EKS Demo

The Wrap-up

Even though Kubernetes has been there for a while now, it’s taken the DevWorld by storm. As an open source container management framework, it helps run containers at scale. Now with the support of AWS via EKS, developers will be able to build or run microservices or distributed applications seamlessly on Amazon Web Services.

—END —

P.S. : TotalCloud.io now supports EKS! Sign-up today, and see how easy it is to monitor EKS service in context with other AWS services in a visual console.

Editorial Note: This guest blog post is written by DevOps/ AWS Solution Architect Nikit Swaraj and author of Packt Publications’ AWS Automation Cookbook.

RELATED READING #1: If you are more of a Docker person and trying wrap your head around Docker Swarm versus Kubernetes, we have got you covered. Read here.

RELATED READING #2: If you are looking for quick information around Amazon ECS Vs. EKS. Vs. Fargate, here’s a quick read!

Don’t forget to share your feedback with us!

A Quick Guide On How To Deep Dive Into Amazon Eks

Smart Scheduling at your fingertips

Go from simple to smart, real-time AWS resource scheduling to save cost and increase team productivity.

Learn More
More Posts

You Might Also Like

AWS Use Case Files
TotalCloud Inventory Actions: Giving a new meaning to Cloud Inventory
Learn how the TotalCloud Inventory Dashboard can become equivalent to your cloud provider’s SDK. Carry out any action on any discovered resource with Inventory Actions.
July 30, 2020
Sayonee
AWS Tips & Tricks
AWS Tutorial: Create an AWS Instance Scheduler with Terraform
Terraform is a popular IaaS tool used by many to create, update, and maintain their AWS architecture. If you use Terraform to provision your AWS architecture, you won’t be disappointed with our new AWS tutorial video.We provide you with the means to set up your own instance scheduler from Terraform...
July 20, 2020
Hrishikesh
Cloud Computing
Azure vs AWS: What you need to know
Companies that have jumped the gun with cloud migration during this time of crisis have committed a fatal mistake. The knowledge gap among businesses that seek to migrate is often underestimated, leading to devastating expenditures and operational inefficiencies...
July 15, 2020
Hrishikesh
AWS Use Case Files
Automating Auto Scaling Group Updates
AWS introduced autoscaling to make EC2 cluster scaling easier. We've seen users constantly make changes to their EC2s and put new policies into play. It’s important to update your Autoscaling group with the new instances so that it doesn’t ignore these machines.
July 6, 2020
Hrishikesh
AWS Use Case Files
Auto Remediation: Increase DB size when Disk Space Utilization Crosses 90%
A common occurrence in Instance management is the risk of overutilization of disk space. Several factors can cause an increase in Diskutilization to go over 90%. For example, user-initiated heavy workloads, analytic queries, prolonged deadlocks, and lock waits, multiple concurrent transactions, long-running transactions, or other processes that utilize CPU resources...
July 3, 2020
Hrishikesh
AWS Use Case Files
Launch EC2 Instances with CloudFormation
CloudFormation is the gateway to Infrastructure-as-code for AWS users. Learn how you can deploy Cloudformation templates through Totalcloud workflows and increase your customization.
June 25, 2020
Hrishikesh