Sitemap
DevOps.dev

Devops.dev is a community of DevOps enthusiasts sharing insight, stories, and the latest development in the field.

🚀 Deploying the 2048 Game App on AWS EKS Using Fargate

2 min readJul 8, 2025

--

If you’re exploring how to deploy containerized applications on AWS using Kubernetes, this guide walks you through deploying the popular 2048 game on Amazon EKS with Fargate—no EC2 nodes needed!

📌 Prerequisites

Make sure you have the following tools installed and configured on your local machine:

🛠️ Step 1: Create an EKS Cluster with Fargate

We’ll create an EKS cluster with Fargate, so we don’t have to manage EC2 instances manually.

eksctl create cluster \
--name demo-cluster \
--region us-east-1 \
--fargate

🧱 Step 3: Create a Fargate Profile

The profile defines which pods should run on Fargate:

eksctl create fargateprofile \
--cluster demo-cluster \
--region us-east-1 \
--name alb-sample-app \
--namespace game-2048

🎮 Step 4: Deploy the 2048 Application

We’ll now deploy the 2048 app, including the Deployment, Service, and Ingress resources:

ubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.5.4/docs/examples/2048/2048_full.yaml

Note: This YAML file is also available in the GitHub repo linked at the end.

🌐 Step 5: Set Up the AWS Load Balancer Controller

To expose the application using an Application Load Balancer (ALB), follow these steps:

✅ a. Create OIDC Provider

This enables IAM roles for service accounts (IRSA). The setup guide and commands are included in the GitHub repo under:

Get Dhuddu Praveen’s stories in your inbox

Join Medium for free to get updates from this writer.

➡️ configure-oidc-connector.md

✅ b. Create IAM Role & Policy for the ALB Controller

You’ll create a Kubernetes service account linked to an IAM role that has permissions to manage ALBs.

✅ c. Install the AWS Load Balancer Controller via Helm

The ALB Controller runs as a deployment inside your cluster and automatically provisions ALBs for Ingress objects.

Press enter or click to view image in full size

✅ Step 6: Access the 2048 Game

Once the Ingress and Load Balancer are up, you’ll get a DNS endpoint. Open it in your browser to play 2048 🎉

Press enter or click to view image in full size

🧹 Step 7: Clean Up (Optional)

When you’re done, delete the EKS cluster to avoid unwanted AWS charges:

eksctl delete cluster --name demo-cluster --region us-east-1

📂 GitHub Repo

All configuration files and helper scripts for this project are available in the repo:

🔗 Game_2048 on GitHub

💡 Final Thoughts

This project is a simple yet powerful demonstration of how to run Kubernetes applications on AWS using EKS with Fargate. It’s great for learning how to integrate with ALB, use service accounts securely, and avoid managing infrastructure directly.

--

DevOps.dev
DevOps.dev

Published in DevOps.dev

Devops.dev is a community of DevOps enthusiasts sharing insight, stories, and the latest development in the field.