Create Kubernetes cluster on Amazon EKS | the easy way š”
TechWorld with Nana
Posted on September 11, 2020
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:
-
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)
-
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
-
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.
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 101 āŗ Compact 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:
Posted on September 11, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.