Friday, 10 January 2020

Creating an EKS Cluster in AWS Using eksctl

In this article, we will create an EKS Cluster in AWS using [eksctl](https://github.com/weaveworks/eksctl). eksctl is a simple CLI tool for creating clusters on EKS - Amazon's new managed Kubernetes service for EC2. It is written in Go, and uses CloudFormation. This is the general architecture. This article only focuses on EKS part. ![image](https://user-images.githubusercontent.com/35857179/70802545-b38bea80-1dec-11ea-87d4-0cd28ba9b5ff.png) To install eksctl, you can use [homebrew](https://brew.sh/) if you are a macOS user: ```bash brew tap weaveworks/tap brew install weaveworks/tap/eksctl ``` or use [chocolatey](https://chocolatey.org/) if you are a Windows user: ```bash chocolatey install eksctl ``` Before creating a cluster, make sure you have setup your aws credentials. To do that, you can run ``aws configure`` to perform your setup. The region for this demostration is ``us-east-1``. After the configuration setup, you can run the below command to verify ```bash aws sts get-caller-identity ``` To create a EKS cluster, you can simply use ```bash eksctl create cluster ``` or with some parameters ```bash eksctl create cluster --region=us-east-1 --node-type=t2.medium ``` If you don't specify parameters, the default parameters will be used: ``` exciting auto-generated name, e.g. "fabulous-mushroom-1527688624" 2x m5.large nodes (this instance type suits most common use-cases, and is good value for money) use official AWS EKS AMI us-west-2 region dedicated VPC (check your quotas) using static AMI resolver ``` The process may take up to 15 minutes. ![image](https://user-images.githubusercontent.com/35857179/70804281-0cf61880-1df1-11ea-8061-aa3942255a3c.png) Once it is ready, run the following command to verify ```bash kubectl get nodes ``` ``` NAME STATUS ROLES AGE VERSION ip-192-168-10-12.ec2.internal Ready 2m6s v1.14.7-eks-1861c5 ip-192-168-41-124.ec2.internal Ready 2m5s v1.14.7-eks-1861c5 ``` If you go to AWS Console and direct to EKS page, you can see there are three clusters created by ``eksctl``. Since we do not specify the name, so the cluster name is generated randomly. ![image](https://user-images.githubusercontent.com/35857179/70805187-4f205980-1df3-11ea-9a2f-855b6990cd6a.png) For the eksctl documentation, please check out [here](https://eksctl.io/).

No comments:

Post a Comment

A Fun Problem - Math

# Problem Statement JATC's math teacher always gives the class some interesting math problems so that they don't get bored. Today t...