DEV Community

Cover image for Create Kubernetes cluster on Amazon EKS | the easy way 💡
TechWorld with Nana
TechWorld with Nana

Posted on • Updated on

Create Kubernetes cluster on Amazon EKS | the easy way 💡

What is EKS? 🤔

AWS EKS is a Managed Kubernetes Service called Elastic Kubernetes Service by Amazon.

EKS helps in running the Kubernetes cluster on AWS, taking care of the Master Nodes. All the necessary applications/services, like the container runtime or master processes are already pre-installed.
And in addition to that it also takes care of scaling and backups. 🚀

So, you only create and care about the Worker Nodes.


Learn about the difference of Kubernetes Master and Worker Nodes here: ► https://youtu.be/umXEmn3cMWY

Steps to create a K8s cluster 👀

To create a K8s cluster in EKS there are following steps involved:

  1. Setup or preparation steps

    • create AWS account (free tier for 1 year)
    • create a VPC (your virtual private space)
    • create an IAM role with Security Group (or in other words: create AWS user with list of permissions)
  2. Create Cluster Control Plane - Master Nodes
    You need to create the control plane with previous IAM role. Here you choose basic information like:

    • cluster name and k8s version
    • region and VPC for your cluster
    • set security for your cluster
  3. Create Worker Nodes and connect to cluster
    On AWS these Worker Nodes are some EC2 instances with certain CPU, RAM and storage resources.

    • Create as a Node Group (group of Nodes)
    • Choose cluster it will attach to
    • Define Security Group, select instance type, resources

With NodeGroup you also have autoscaling, which means depending on how much load the cluster has, new Worker Nodes will be added or removed in the cluster automatically.

  • For that you need to define max and minimum number of Nodes.

Complex 🤯, but powerful and popular

You're right, that's a lot of effort for just creating a simple Kubernetes cluster.

Compared to other managed Kubernetes services, like DigitalOcean or Linode it's more complex.
On the other hand, it's very powerful and this comes with complexity. And being the market leader for providing cloud infrastructure you might just have to use it.

So, how to do it, when you just want to create a cluster as fast as possible and start deploying your containers inside. 🧐

Actually, instead of doing all those steps manually, there is a faster and more efficient way. 🤠

The easy way - using eksctl 🚀

eksctl is a simple CLI tool for creating clusters on EKS. With just one command you create a cluster.

Create K8s cluster using eksctl

I'm a huge fan of understanding the concepts of how a technology works, but if there are tools that make working with this technology much easier, then I like to use them. Usually those tools are built by community, which are specialized in this technology. 💡 So it makes sense to use that knowledge.

DEMO 👩🏻‍💻

So in the demo we will create the Kubernetes cluster using eksctl.

Watch the full video and demo here 🤓


Kubernetes 101Compact and easy-to-read ebook bundle 🚀
It's a handy way to quickly look something up or refresh your knowledge at work and use it as your cheatsheet 😎

Like, share and follow me 😍 for more content:

Top comments (0)