AWS + KUBERNATES = AMAZON E

AWS + KUBERNATES = AMAZON E

Amazon Elastic Kubernetes Service (Amazon EKS) is a fully managed Kubernetes service. Amazon EKS automatically detects and replaces unhealthy control plane instances, restarting them across the Availability Zones within the Region as needed. Amazon EKS leverages the architecture of AWS Regions in order to maintain high availability.



Joomla is a free and open-source content management system (CMS) for publishing web content, developed by Open Source Matters, Inc. It is built on a model–view–controller web application framework that can be used independently of the CMS.

MySQL is free and open-source software under the terms of the GNU General Public License and is also available under a variety of proprietary licenses. MySQL was owned and sponsored by the Swedish company MySQL AB, which was bought by Sun Microsystems (now Oracle Corporation).

OBJECTIVE OF TASK:-

1. At first, a multi-node EKS cluster is to be created on the top of AWS. 

2.then, two services, namely Joomla and MySQL are to be launched in that multi-node cluster. 

3. Both services will be getting persistent storage from the EFS service of AWS. 

4. Joomla service is to be exposed to the public world using the Load Balancer (ELB) service of AWS. 


STEPS FOLLOWED IN COMPLETION OF THE TASK :-

STEP 1:The very first step is to create an IAM user in your AWS account. The IAM user must have administrative permissions. A key is to be generated using which we can log in into this IAM account. The next step is to log in to the IAM account using CLI. For this, “aws” command is required. 

The command to login is: “aws configure”

No alt text provided for this image

STEP 2 :Now after logging into the account we create the cluster ,for that first we download the eksctl command from the internet and add it into our path.The next step is to configure the “eksctl” command in your local system so that we can use the EKS service of AWS more efficiently. 

STEP 3: for launching cluster first we have to configure it using YAML file.

No alt text provided for this image

In this cluster, I am going to launch three Node Groups and one of the node groups will be launched as a spot instance. I have also attached a public key to all the nodes in order to login to the nodes. 

The cluster will be launched in the ap-south-1 (Mumbai) region.

Now for creating the cluster we use the command

$ eksctl create cluster -f cluster.yml
No alt text provided for this image
No alt text provided for this image

hence the cluster has been created.

No alt text provided for this image

after cluster get created some services and resources launched in aws by cluster.

RESOURCES LAUNCHED BY EKS CLUSTER IN AWS:-

No alt text provided for this image

SERVICES LAUNCHED IN VPS BY EKS CLUSTER :-

No alt text provided for this image

INSTANCES LAUNCHED:-

No alt text provided for this image

STEP 3: The next step is to configure the kubectl command in the local system in order to contact the cluster. 

Then we have to update the “config” file so that kubectl can contact the master node of the EKS cluster.

No alt text provided for this image

updated kube config file:-

No alt text provided for this image

 general information of the resources running in the cluster:

No alt text provided for this image

STEP 4: create a separate namespace to launch resources in the cluster.

No alt text provided for this image

The newly created namespace is to be set as the default namespace:

No alt text provided for this image

The information of the cluster is:

No alt text provided for this image

STEP 5: we need to launch an EFS service to give storage to our pods. And we have to launch the EFS in the same security group in which the nodes are launched. The EFS will be launched in the same VPC where the cluster has been launched. Else, there will be no connectivity between the EFS and the pods. 

And hence, the EFS has been launched:

No alt text provided for this image

Now, in order to give the EFS storage to the pods, we need to download the “amazon-efs-utils” program on all the slave nodes. 

STEP 6: next step to download the amazon-efs-program on all the nodes.

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

STEP 7:Now, the main process starts where I am going to launch Joomla and MySQL services on the top of the cluster. For this, numerous different resources and services are to be configured such as secret, efs-provisioner, role binding, PVC, deployment, etc.

I have configured everything using the YAML files of the respective services/resources. Here are all those files:

YAML file for EFS-Provisioner:

No alt text provided for this image

creating storage class:

No alt text provided for this image

Now creating the mysqldeployment.yaml file. The file service, PVC and Deployment. Deployment consists of the replicaset, container specifications and image details. The PVC will create a request for a persistent volume of size 10GiB. This persistent volume uses EFS to store the data. The volume is mounted to the /var/lib/mysql folder since it stores all the data.

No alt text provided for this image

After creating the file for database, we shall now create the joomla.yaml file.

In this file we have created the code for setting up the Joomla app on our one of the clusters. In this Service acts as a loadbalancer and exposes the setup to the outside world ,rest is the same as the mysql server file.

No alt text provided for this image

Now creating YAML.file for Role-Binding:

No alt text provided for this image

Now created secret key YAML.file where mysql database password are stored.

LIST OF YAML.FILES CREATED

No alt text provided for this image

STEP 8: launched all the resources and services using the above YAML files.

command use to launch the service:

kubectl create -f

No alt text provided for this image

All the resources and services have been successfully launched:

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

STEP 9: Creating the load balancer.The Load Balancer service in the EKS cluster is launched using the ELB (Elastic Load Balancer) service of the AWS:

No alt text provided for this image

And the Joomla service has been successfully launched on the multi-node EKS cluster:

No alt text provided for this image

And finally the goal of making this task has been acheived. The final objective of task been completed by launching joomla on pod.

HAVE A GOOD DAY........

THANKYOU........

Github link: https://github.com/ankiiitt/EKS---TASK-


要查看或添加评论,请登录

Ankit Kumar的更多文章

  • How Kubernetes Is Changing The Business ????

    How Kubernetes Is Changing The Business ????

    What is Kubernetes?? ???? Kubernetes is an open-source platform for managing containers. The product is created by…

    1 条评论
  • Create CloudFront Architecture with AWS CLI

    Create CloudFront Architecture with AWS CLI

    What is AWS ? AWS is a Public-Cloud platform providing world-wide service and offer over 170 fully-featured services…

    1 条评论
  • AWS Customer Success Story

    AWS Customer Success Story

    What is Cloud Computing? The company that provides their resources over the internet and charges according to the…

  • Big Data

    Big Data

    Today is the world of data and most of the big companies like Facebook, Google, Microsoft, Netflix, Amazon, etc are…

  • Flutter Music Player

    Flutter Music Player

    This article refers to the creation of a Music App with the use of one great Platform know as Flutter. There are many…

  • Integration of Ansible with Docker

    Integration of Ansible with Docker

    This is the first task of Ansible under Mr. Vimal Daga Sir.

    1 条评论
  • FLUTTER ENVIRONMENT SETUP

    FLUTTER ENVIRONMENT SETUP

    What is Flutter? Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web,…

  • End to End INTEGRATION Of Docker, Jenkins, Github, Git, Redhat

    End to End INTEGRATION Of Docker, Jenkins, Github, Git, Redhat

    DevOps task2 Let us first understand what we are going to do in this task. Task description 1.

    2 条评论
  • TASK 1 COMPLETE INTEGRATION OF JENKINS WITH GITHUB

    TASK 1 COMPLETE INTEGRATION OF JENKINS WITH GITHUB

    Task Description TASK 1 JOB#1 If Developer push to dev branch then Jenkins will fetch from dev and deploy on the…

  • FACE RECOGNITION USING TRANSFER LEARNING

    FACE RECOGNITION USING TRANSFER LEARNING

    Task4 Create a project using transfer learning solving various problems like Face Recognition, Image Classification…

社区洞察

其他会员也浏览了