Implementing 2048 Game on EKS Cluster with Ingress Routing
Introduction
Kubernetes has become the standard tool for managing containerized applications at scale, providing a robust platform for orchestrating and scaling workloads across clusters of machines. AWS Elastic Kubernetes Service (EKS) simplifies the process of deploying, managing, and scaling Kubernetes clusters on AWS infrastructure, offering a seamless integration with other AWS services.
The process of deploying the popular 2048 Game application on an AWS EKS Cluster using Helm Charts. Helm is a package manager for Kubernetes that streamlines the installation and management of applications on Kubernetes clusters.
Steps Followed:
Step 1: Launch an AWS EC2 Medium Instance
- Launch an AWS EC2 T2 Medium Instance.
- Enable necessary permissions and security groups.
Step 2: Install and Configure AWS CLI
- SSH into the EC2 instance and Install the AWS CLI using the appropriate package manager.
- Run "aws configure"
- Enter the IAM user's access key ID, secret access key and set the default region and output format.
Step 3: Install and setup kubectl
- Kubectl is a command-line interface (CLI) tool that is used to interact with Kubernetes clusters. It allows users to deploy, inspect, and manage Kubernetes resources such as pods, deployments, services and more.
- Kubectl enables users to perform operations such as creating, updating, deleting, and scaling Kubernetes resources.
Step 4: Install and set up eksctl
- The eksctl is a command line tool for working with EKS clusters that automates many individual tasks.
- eksctl tool uses CloudFormation under the hood, creating one stack for the EKS master control plane and another stack for the worker nodes.
Step 5: Install Helm Chart
- Helm is a package manager for Kubernetes, an open-source container orchestration platform.
- Helm helps to manage Kubernetes applications by making it easy to install, update, and delete them.
Step 6: Create an EKS Cluster using EKSCTL
- Use eksctl to create an EKS cluster, specifying parameters such as region, node instance type, and cluster name.
- eksctl will create an empty cluster, we will host the Kubernetes application on this cluster and see how Ingress Service caters requests from the client.
- After some time of execution in your AWS Console, you can able to see the EKS and Worker Nodes created under Compute.
领英推荐
Step 7: Set up IAM Role for Service Accounts
- The IAM permissions can either be setup via IAM roles for ServiceAccount or can be attached directly to the worker node IAM roles.
- ??(a) your AWS account id,
?? (b) Set your default AWS region,
??????????(c) your EKS cluster name.
Step 8: Create IAM OIDC provider
- ?Create an OIDC identity provider for your AWS account to enable IAM roles for service accounts.
Step 9: Download IAM Policy for the load balancer using CURL command
- Ingress configuration requires IAM Policy for certain actions to be allowed.Step 10: Create an IAM Role and Service Account.
- ?Create an IAM service account for your Kubernetes cluster.
Step 11: Install the Target Group Binding CRDs
- Install any necessary Custom Resource Definitions (CRDs) required for target group bindings.
Step 12: Deploy the Helm chart
- Deploy the Helm chart for the 2048 Game onto the EKS cluster.
Step 13: Configure AWS ALB (Application Load Balancer)?
- Configure an AWS Application Load Balancer (ALB) to act as the entry point for incoming traffic to the Kubernetes cluster.
Step 14: Deploy Sample Application
- Deploy the 2048 Game application onto the EKS cluster.
Step 15: Get Ingress URL and check EKS Pod Data
- Retrieve the URL exposed by the Ingress resource and test accessing the deployed application.
- Open the URL link in another browser. You can see that our 2048 Game is deployed? and can be accessed.
Step 16: Delete EKS cluster
- ?Once testing is complete and the resources are no longer needed, delete the EKS cluster to avoid unnecessary costs.Thank You Cloudoholic