Deploying Web Application On Amazon EKS(Elastic Kubernetes Service)

Aditya Raj
4 min readJul 15, 2020

--

Amazon EKS :

Amazon Elastic Kubernetes Service (Amazon EKS) is a fully managed Kubernetes service. Customers such as Intel, Snap, Intuit, GoDaddy, and Autodesk trust EKS to run their most sensitive and mission critical applications because of its security, reliability, and scalability.

Benefits of EKS :

  1. High Availability
  2. Serverless option
  3. Secure
  4. Buid with the community

How does Amazon EKS work?

  1. First, create an Amazon EKS cluster in the AWS Management Console or with the AWS CLI or one of the AWS SDKs.
  2. Then, launch worker nodes that register with the Amazon EKS cluster. We provide you with an AWS CloudFormation template that automatically configures your nodes.
  3. When your cluster is ready, you can configure your favorite Kubernetes tools (such as kubectl) to communicate with your cluster.
  4. Deploy and manage applications on your Amazon EKS cluster the same way that you would with any other Kubernetes environment.

Pre-requisite for deploying web application on AWS EKS :

  1. Install AWS CLI : First we need to install AWS CLI
  2. Configure your AWS CLI credentials: Both eksctl and the AWS CLI require that you have AWS credentials configured in your environment. The aws configure command is the fastest way to set up your AWS CLI installation for general use.
  3. Install eksctl : eksctl is a simple CLI tool for creating clusters on EKS
  4. Install and configure kubectl : Kubernetes uses the kubectl command-line utility for communicating with the cluster API server.

Step 1:

In this step first we need to create IAM user with Administration Access.

Now we need to configure aws with the access key ,secret key and region name to use aws from CLI.

Step 2:

In this step we will create the aws eks cluster with the help of eksctl command.

After this we need to run this command to create cluster.

eksctl create cluster -f cluster.yml

This will create eks cluster with three nodes.

Now we need to upadte the kubectl config file so that kubectl can connect to the eks cluster.

Now create a new namespace

Step 3 :

In this step we will create pvc for our Web Application and for storage we are going to use EFS.

Firstly we will craete an EFS for storage.

Now for using EFS we need to install amazon-efs-utils on worker nodes of the cluster.

Step 4 :

In this step we will craete few yml file for deploying oue web application.

Firstly we will create a provisioner for EFS.

Now we will create role binding.

Now we will craete a storage class.

Now create mysql deployement.

Now we will create wordpress depoyement.

Now we will create a kustomization file.

Now finally we will apply the kustomization file will create the complete setup.

Thanks !!!

--

--

Aditya Raj

I'm passionate learner diving into the concepts of computing 💻