Relive the nostalgia of 90s gaming by deploying the classic Super Mario on Amazon EKS using Kubernetes! This guide walks you through the steps to bring Mario’s adventures to life, leveraging the scalability and reliability of Kubernetes.
Prerequisites
Ubuntu instance
IAM role
Installed: Terraform, AWS CLI, Kubectl
Steps to Deploy
1. Launch an Ubuntu Instance
Log in to the AWS Console and navigate to EC2.
Launch a new instance with:
AMI: Ubuntu
Instance Type: t2.micro
Storage: 8G
B
Attach a security group with necessary access rules
.
2. Create an IAM Role
Go to IAM > Roles and create a role:
Entity: AWS Service
Use Case: EC2
Policy: Administrator Access (for learning only)
Attach the role to your EC2 instance for cluster provisioning.
3. Set Up the Environment
SSH into the instance using MobaXterm or PuTTY.
Clone the repo:
git clone https://github.com/imkiran13/Super-mario-EKS.git cd Super-mario-EKS sudo chmod +x script.sh ./script.sh
This script installs Terraform, AWS CLI, Kubectl, and Docker.
Verify installations:
docker --version aws --version kubectl version --client terraform --version
4. Provision the Kubernetes Cluster
Navigate to the Terraform directory:
cd EKS-TF terraform init terraform validate terraform plan terraform apply --auto-approve
Update your Kubernetes configuration:
aws eks update-kubeconfig --name EKS_CLOUD --region ap-south-1
5. Deploy Mario
Now change directory back to k8s-mario
cd ..
Apply deployment and service YAMLs:
kubectl apply -f deployment.yaml kubectl apply -f service.yaml
Get the LoadBalancer Ingress URL:
kubectl describe service mario-service
Open the URL in a browser to play the game! 🎮
Cleanup
Remove resources:
kubectl delete service mario-service kubectl delete deployment mario-deployment terraform destroy --auto-approve
Enjoy the perfect blend of nostalgia and modern technology with this fun deployment! Until next time, happy gaming! 👾