0% found this document useful (0 votes)
108 views

Three Tier Architecture, Deployed On EKS

This document outlines the steps to deploy a three-tier architecture application on AWS EKS using Fargate, including: 1. Creating an EKS cluster with eksctl and installing necessary tools like kubectl 2. Configuring IAM roles and policies for the EKS cluster 3. Installing the AWS Load Balancer controller using Helm to provide an ALB 4. Configuring the EBS CSI driver to provide EBS volumes

Uploaded by

karanbali200892
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views

Three Tier Architecture, Deployed On EKS

This document outlines the steps to deploy a three-tier architecture application on AWS EKS using Fargate, including: 1. Creating an EKS cluster with eksctl and installing necessary tools like kubectl 2. Configuring IAM roles and policies for the EKS cluster 3. Installing the AWS Load Balancer controller using Helm to provide an ALB 4. Configuring the EBS CSI driver to provide EBS volumes

Uploaded by

karanbali200892
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Three Tier Architecture Project Design, Architecture and Deployment on AWS EKS.

https://github.com/iam-veeramalla/three-tier-architecture-demo/tree/master/EKS

https://www.youtube.com/watch?v=8T0UnSgywzY

AWS AccessKey ID- AKIAUAOM4X(modified)

AWS Secret Key - 7Nu+Qnp8afT/yTrlDz/BEP0RHyR(modified)

Prerequisites- eksctl, awscli, kubectl

1. Install kubectl

https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html

2. Install Eksctl
# Download the latest release
curl --silent --location
"https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -
s)_amd64.tar.gz" | tar xz -C /tmp

# Move the binary to a directory in your PATH


sudo mv /tmp/eksctl /usr/local/bin

Lab

1. Create EKS cluster using Fargate use below command

eksctl create cluster --name demo-cluster-three-tier-robo1 --region ap-south-1

to delete
eksctl delete cluster --name demo-cluster-three-tier-robo1 --region ap-south-1
commands to configure IAM OIDC
provider
export cluster_name=demo-cluster-three-tier-robo1
oidc_id=$(aws eks describe-cluster --name $cluster_name --query
"cluster.identity.oidc.issuer" --output text | cut -d '/' -f 5)

aws iam list-open-id-connect-providers | grep $oidc_id | cut -d "/" -f4


eksctl utils associate-iam-oidc-provider --cluster $cluster_name --approve

setup alb add on


Download IAM policy

curl -O https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-
controller/v2.5.4/docs/install/iam_policy.json

aws iam create-policy \

--policy-name AWSLoadBalancerControllerIAMPolicy \

--policy-document file://iam_policy.json
eksctl create iamserviceaccount \

--cluster=demo-cluster-three-tier-robo1 \

--namespace=kube-system \

--name=aws-load-balancer-controller \

--role-name AmazonEKSLoadBalancerControllerRole \

--attach-policy-arn=arn:aws:iam::275844480429:policy/AWSLoadBalancerControllerIAMPolicy \

--approve

Install Helm
curl -fsSL -o get_helm.sh
https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

helm repo add eks https://aws.github.io/eks-charts


helm repo update eks

helm install aws-load-balancer-controller eks/aws-load-balancer-controller -n kube-system \

--set clusterName=demo-cluster-three-tier-robo1 \

--set serviceAccount.create=false \

--set serviceAccount.name=aws-load-balancer-controller \

--set region=ap-south-1 \

--set vpcId=vpc-08d56f0f04d3029dc

kubectl get deployment -n kube-system aws-load-balancer-controller

EBS CSI Plugin configuration

eksctl create iamserviceaccount \

--name ebs-csi-controller-sa \

--namespace kube-system \

--cluster demo-cluster-three-tier-robo1 \
--role-name AmazonEKS_EBS_CSI_DriverRole \

--role-only \

--attach-policy-arn arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy \

--approve

eksctl create addon --name aws-ebs-csi-driver --cluster demo-cluster-three-tier-robo1 --service-


account-role-arn arn:aws:iam::275844480429:role/AmazonEKS_EBS_CSI_DriverRole --force
After 2min all pods are up and running

You might also like