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 :
- High Availability
- Serverless option
- Buid with the community
How does Amazon EKS work?
- First, create an Amazon EKS cluster in the AWS Management Console or with the AWS CLI or one of the AWS SDKs.
- Then, launch worker nodes that register with the Amazon EKS cluster. We provide you with an AWS CloudFormation template that automatically configures your nodes.
- When your cluster is ready, you can configure your favorite Kubernetes tools (such as kubectl) to communicate with your cluster.
- 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 :
- Install AWS CLI : First we need to install AWS CLI
- 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.
- Install eksctl : eksctl is a simple CLI tool for creating clusters on EKS
- Install and configure kubectl : Kubernetes uses the kubectl command-line utility for communicating with the cluster API server.
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.
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.