Table of contents
No headings in the article.
Prerequisite:
1.Setup EC2 server in AWS with awscli, kubectl and eksctl.
2.Create eksctlrole in IAM and attach EC2FullAccess, AWSCloudFormation Full Access, IAM Full Access. Attach the created eksctlrole role to your Ec2 server run eksctl command .AmazonS3FullAccess
AmazonEC2FullAccess
AmazonRoute53FullAccess
IAMFullAccess
AmazonVPCFullAccess
Steps :
- Step1: AWS CLI Installation on the EC2 instance
curl "awscli.amazonaws.com/awscli-exe-linux-x86_6.." -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
/usr/local/bin/aws --version
Link for reference : https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
chmod +x ./kubectl
mv kubectl /usr/local/bin
Link for reference : https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html
Step3: EKS installation
curl --silent --location "[[github.com/weaveworks/eksctl/releases/lates](github.com/weaveworks/eksctl/releases/lates....](github.com/weaveworks/eksctl/releases/lates.. -s)_amd64.tar.gz" | tar xz -C /tmp
cd /tmp
mv eksctl /usr/local/bin
eksctl version
PATH=$PATH:/usr/local/bin;export PATH echo 'export PATH=$HOME/bin:$PATH' >> ~/.bashrc
Link for reference : https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html
Step4: EKS Cluster Setup
Use eksctl to create the EKS cluster
eksctl create cluster --name <cluster-name> --region <region> --node-type t2.micro --nodes-min 2 --nodes-max 2
Update the kubeconfig to connect to the newly created EKS cluster
aws eks update-kubeconfig --region <region> --name <cluster-name>
Verify node
kubectl get nodes
You can clone the code with git clone and deploy with using kubectl apply -f command. I have covered this part in details in last blog.
Thank you!