GithubHelp home page GithubHelp logo

supermario-k8s's Introduction

Deploying Super Mario on Kubernetes

Super Mario is a classic game loved by many. In this guide, we'll explore how to deploy a Super Mario game on Amazon's Elastic Kubernetes Service (EKS). Utilizing Kubernetes, we can orchestrate the game's deployment on AWS EKS, allowing for scalability, reliability, and easy management

Let's Deploy

Step 1. Launch Ubuntu instance

Choose ubuntu server and select t2.micro as your instance type.

Create IAM role and assign ec2 server you have created

For permission policy select Administrator Access (Just for learning purpose)

Step 2. Cluster provision

git clone https://github.com/NirmalNaveen20/supermario-k8s.git

Change the directory

cd supermario-k8s

Provide the executable permission to script.sh file, and run it.

sudo chmod +x script.sh

./script.sh

This script will install Terraform, AWS cli, Kubectl, Docker.

Check versions:

docker --version

aws --version

kubectl version --client

terraform --version

Now change directory into the EKS-TF

Run Terraform init

NOTE: Don’t forgot to change the s3 bucket name in the backend.tf file

cd EKS-TF

terraform init

Now run terraform validate and terraform plan

terraform validate

terraform plan

Now Run terraform apply to provision cluster.

terraform apply --auto-approve

Step 2. Kubernetes Configuration

Update the Kubernetes configuration

Make sure change your desired region

aws eks update-kubeconfig --name EKS_CLOUD --region us-east-1

Let’s apply the deployment and service

Deployment

kubectl apply -f deployment.yaml #to check the deployment

kubectl get all

Now let’s apply the service

Service

kubectl apply -f service.yaml

kubectl get all

Now let’s describe the service and copy the LoadBalancer Ingress

kubectl describe service mario-service

Paste the ingress link in a browser and you will see the Mario game.

Let’s Go back to 1985 and play the game like children.

This is official image by MR CLOUD BOOK

You can check in Docker-hub as well nirmalnaveen/supermario

Let's remove the service and deployments

kubectl get all

kubectl delete service mario-service

kubectl delete deployment mario-deployment

terraform destroy --auto-approve

⚠Note:

Don’t forget to Stop or Delete all clusters and services of AWS otherwise this will cost you without knowing you.

Author

Logo

supermario-k8s's People

Contributors

nirmalnaveen20 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.