There are no items in your cart
Add More
Add More
Item Details | Price |
---|
Sat Oct 28, 2023
Kubernetes is the widely adopted solution for handling cloud-based containers, and Amazon EKS simplifies Kubernetes deployment on AWS.
Amazon Elastic Kubernetes Service (EKS) is a fully managed Kubernetes service provided by AWS, making it easier to deploy, manage, and scale containerized applications using Kubernetes.
eksctl is a command-line tool for creating and managing EKS clusters.
In this guide, we'll walk you through the process of setting up a Kubernetes EKS cluster on AWS using the eksctl tool, empowering you to fully leverage containerized applications.
Before we begin, ensure you have the following prerequisites in place:
First, we'll launch an Amazon Elastic Compute Cloud (EC2) instance type of t2.micro.
This instance will serve as the control center for creating and managing our EKS cluster.
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install
Configure your AWS Access Key ID, AWS Secret Access Key, default region name, and default output format by using the "aws configure" command.
Kubectl is a command line tool that you use to communicate with the Kubernetes API server.
Download the kubectl
binary for your cluster's Kubernetes version-1.28 from Amazon S3
curl -O https://s3.us-west-2.amazonaws.com/amazon-eks/1.28.2/2023-10-17/bin/linux/amd64/kubectl
(Optional) Verify the downloaded binary with the SHA-256 checksum for your binary.
Check the SHA-256 checksum for your downloaded binary with one of the following commands.curl -O https://s3.us-west-2.amazonaws.com/amazon-eks/1.28.2/2023-10-17/bin/linux/amd64/kubectl.sha256
sha256sum -c kubectl.sha256openssl sha1 -sha256 kubectl
chmod +x ./kubectl
Copy the binary to a folder in your PATH. If you have already installed a version of kubectl, then we recommend creating a $HOME/bin/kubectl and ensuring that $HOME/bin comes first in your $PATH.After you install kubectl, you can verify its version.mkdir -p $HOME/bin && cp ./kubectl $HOME/bin/kubectl && export PATH=$HOME/bin:$PATH
kubectl version --client
To download the latest release, run:
Determine whether# for ARM systems, set ARCH to: `arm64`, `armv6` or `armv7`ARCH=amd64PLATFORM=$(uname -s)_$ARCHcurl -sLO "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_$PLATFORM.tar.gz"# (Optional) Verify checksumcurl -sL "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_checksums.txt" | grep $PLATFORM | sha256sum --checktar -xzf eksctl_$PLATFORM.tar.gz -C /tmp && rm eksctl_$PLATFORM.tar.gzsudo mv /tmp/eksctl /usr/local/bin
eksctl
installed on your device or noteksctl version
Command to Create EKS Cluster using eksctl command
eksctl create cluster --name <name-of-cluster> --nodegroup-name <nodegrpname> --node-type <instance-type> --nodes <no-of-nodes> eksctl create cluster --name mycluster --nodegroup-name ng-test --node-type t2.medium --nodes 2
the above command will create an EKS cluster named "mycluster" with a node group named "ng-test." The node group will consist of two nodes, each using the "t2.medium" instance type.
it will take around 15-20 mins to setup the cluster.
In background eksctl will trigger AWS Cloudformation to create the EKS Cluster.
eksctl delete cluster --name <name-of-cluster> eksctl delete cluster --name mycluster
I hope you enjoyed reading this blog and found it informative. If you have any questions or topics you'd like us to cover in future blogs, please don't hesitate to connect with me on LinkedIn. Thank you for joining us on this Kubernetes journey