$$\color{green}{\textbf Project: ๐ฎ \color{red} \textbf {Super} \ \color{orange} \ \textbf Mario \ \textbf Bros ๐๐ข}$$
Step 1 โ Login and basics setup
Step 2 โ Setup Docker ,Terraform ,aws cli , and Kubectl
Step 3 โ IAM Role for EC2
Step 4 โAttach IAM role with your EC2
Step 5 โ Building Infrastructure Using terraform
Step 6 โ Creation of deployment and service for EKS
sudo apt update -y
sudo apt install docker.io -y
sudo systemctl start docker
sudo usermod -aG docker ubuntu
newgrp docker
docker --version
sudo yum install docker -y
sudo systemctl start docker
sudo usermod -aG docker ec2-user
newgrp docker
docker --version
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install terraform
- Amazon linux
sudo yum install -y yum-utils shadow-utils
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo
sudo yum install terraform -y
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
sudo apt install unzip
unzip awscliv2.zip
sudo ./aws/install
aws --version
Download the latest release with the command:
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
Install kubectl:
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
Note: If you do not have root access on the target system, you can still install kubectl to the ~/.local/bin directory:
chmod +x kubectl
mkdir -p ~/.local/bin
mv ./kubectl ~/.local/bin/kubectl
kubectl version --client
go to EC2 click on actions โ security โ modify IAM role option
git clone https://github.com/abhipraydhoble/Project-Super-Mario.git
cd Project-Super-Mario
cd EKS-TF
vim backend.tf
terraform init
terraform plan
terraform apply --auto-approve
aws eks update-kubeconfig --name EKS_CLOUD --region ap-southeast-1 --profile eks
change the directory where deployment and service files are stored use the command โ
cd ..
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml
kubectl get all
kubectl get svc mario-service
copy the load balancer ingress and paste it on browser and your game is running
Delete Infra
terraform destroy -auto-approve








