Skip to content

Dolapo265/launch-kubernetes-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

NextWork

Launch a Kubernetes Cluster

Project Link: View Project

Author: dolaposalaam@outlook.com
Email: dolaposalaam@outlook.com


Launch a Kubernetes Cluster

Image


Introducing Today's Project!

In this project, i will deploy my first kubernetes cluster to learn more about what it does and the advantages of using it.

What is Amazon EKS?

Amazon EKS is an AWS service that makes it easier to use Kubernetes by automatically setting up the Kubernetes control plane, managing container deployments, and creating the necessary VPC resources for networking.

One thing I didn't expect

I didn't expect the process to be as straightforward as it was. I also didn't expect access management in IAM to be separate from Kubernetes' own access control system.

This project took me...

The most time-consuming part was making sure i understood the concepts as I went along.


What is Kubernetes?

Kubernetes is a platform designed to manage multiple containers running applications. It automates key tasks like creating, starting, monitoring, and scaling containers based on traffic demands. By automating these tasks, Kubernetes saves time that would otherwise be spent on manual operations, reducing the risk of human error and freeing up resources to focus on adding new features to applications. This is why Kubernetes is widely used by companies and developers.

I used eksctl to create a Kubernetes cluster via the command line. The create cluster command I ran defined the EKS cluster's name and launched a node group. This command also specified the instance type for the nodes and set the number of nodes within the cluster. I configured the node group with a minimum of 1 node and a maximum of 3 nodes, allowing the cluster to scale up or down based on demand.

I initially ran into two errors while using eksctl. The first error occurred because the tool wasn't downloaded, so I downloaded it from the official GitHub repository. The second error happened because my EC2 instance did not have the necessary permissions to access AWS services in my account. To resolve this, I had to create and attach an IAM role to my instance with the appropriate permissions

Image


eksctl and CloudFormation

CloudFormation helped create my EKS cluster by automatically building all the resources specified when I ran eksctl. It created VPC resources because these are necessary for allowing the cluster to communicate with one another, connect to the internet when needed, and still remain private and secure.

There was also a second CloudFormation stack created for the node group. A node group is a collection of EC2 instances running containerized applications, while the cluster is the entire environment that includes the node groups, a control plane that manages decisions like when to create or shut down containers, and the individual nodes (the EC2 instances themselves).

Image


The EKS console

I had to create an IAM access entry to give the IAM admin user on my AWS console access to the cluster. An access entry is part of Kubernetes' access management system that links an IAM user to Kubernetes' role-based access control (RBAC). I set this up by attaching the EKSClusterAdminPolicy to my IAM user.

It took me about 2 hours to create and set up my cluster because I was doing research along the way to make sure I really understood the concepts and the reasons behind each step. This process will be much faster the next time I create an EKS cluster, as I now have a better understanding of the workflow and will be able to replicate it with much less guidance.

Image


EXTRA: Deleting nodes

Did you know you can find an EKS cluster’s nodes in Amazon EC2? This is because they are actually EC2 instances. AWS uses the generic term "nodes" because different cloud platforms use different types of resources as nodes.

Desired size is the number of nodes you would like running in your EKS cluster. Minimum is the least number of nodes, and maximum is the most you would want running. These settings are useful when Kubernetes needs to scale the cluster up or down based on demand.

When I deleted my EC2 instances, new ones were automatically started by Kubernetes to replace them. This is because Kubernetes constantly monitors the cluster to keep it running at the desired capacity if any nodes fail.

Image



About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published