EKS TASK

EKS TASK

What is EKS?

Amazon Elastic Kubernetes Service (Amazon EKS) is a managed service that makes it easy for you to run Kubernetes on AWS without needing to stand up or maintain your own Kubernetes control plane. Kubernetes is an open-source system for automating the deployment, scaling, and management of containerized applications.

EKS is one of the powerful and popular service provided by AWS. Most of the big companies use AWS for setting up their Kubernetes Cluster.

No alt text provided for this image

 For connecting to aws EKS we have following ways such as webUI , CLI and terraform code also. Here we are using CLI but for connecting to aws EKS using CLI we required secret key and access key and CLI also have two ways to connect to EKS

Now , we will see how to connect to EKS using CLI

for this we will use eksctl command this command will launch the cluster for us and with this command we can do lot's of customisation. eksctl internally creates the cloud formation stack and we use it for auto provisioning.

let's now see how it works: -

firstly make sure that your aws is configured and you have installed eksctl also add the path of eksctl.exe file in the environmet variables of the system

now we will launch the cluster using eksctl command

No alt text provided for this image

you can go to aws console and check the progress of cloud formation stack while the cluster is launching.

No alt text provided for this image

after few mins you can see your cluster have been launched

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

now we will connect the master and for this we need to go the config file of .kube and update the file using following command: -

No alt text provided for this image

to check the nodes and describe the nodes we have following command: -

No alt text provided for this image

you can also see your nodes in Ec2 service of aws

No alt text provided for this image

to get the information regarding the cluster , use following command

No alt text provided for this image

now we will create a namespace and set is as default

No alt text provided for this image

Now i am going to create one deployment, scale it and also expose my pod to the outside world with service type load balancer at port no 80

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

now we will see the working of load balancer here it is showing IP 192.168.23.60 but whenever we will re-load the page the IP will get change

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

here in the pod of IP 192.168.6.226 I have made the changes in the PHP file

No alt text provided for this image

now we will create the pvc dynamically and we know whenever we create the pvc dynamically pv automatically gets created. To create the pvc here I am using a yaml file.

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

Here you can see that it is created but is in pending status and to bound it we need to moun this pvc to the pod for that i am using another yml file testvpc.yml.

No alt text provided for this image

you can also check it in the EBS service of AWS

No alt text provided for this image

Now , we will see how many pods are running inside the kube-system

No alt text provided for this image

now , we are going to create a multitier architecture of Wordpress and MySQL using a single yml file known as kustomization.yml

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

now anyone who knows the DNS of my load balancer can access my Wordpress site easily

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

hence , our Wordpress site is working perfectly now we move towards the second step

now , we will initialized the helm and helm is used in kubernetes to install and manage the packages.

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

after doing this we will create a tiller it is a server side component of helm and for this first we will see that whether the tiller-deploy is available in kube-system or not

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

as you can helm and tiller are ready so now by using them we will install prometheus

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

and our prometheus has been installed and working properly so now we will install grafana

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

and as you can see our grafana is also working properly so now we will move towards the next step and launch our fargate cluster

fargate cluster service in aws which provide us serverless architecture but only for containers. Fargate manages everything . It creates slaves i.e worker nodes on run time. EKS uses fargate profile behind the scene which automatically provision the slave as per our demand.

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

and after 15-20 mins our fargate cluster will be launched.

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



Syed Wasil Abidi

Ansible || Hybird Multi Cloud Enthusiast || Docker || AWS || Openstack || Terraform || EKS || Python || Linux Administration

4 年

Thanks?

回复
Onkar Naik

DevOps @Forescout ?? | Google Champion Innovator | AWS | DevOps | 3X GCP | 1X Azure | 1X Terraform | Ansible | Kubernetes | SRE | Jenkins | Tech Blogger ??

4 年

Great work ?

回复
Arshit Paliwal

Analyst @ Annalect | 5x Datorama Certified | DevOps | Cloud

4 年

Great ??

Akash Pandey

Cloud Architect ? 6X Azure ? 1X Databricks ? ACE Certified ? MCT

4 年

Good Work Srishti Jain

Abhishek Chouhan

DevOps Engineer at Toorak Capital

4 年

GreaT worK!!

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

Srishti Jain的更多文章

  • Configuring Load Balancer on AWS using Ansible

    Configuring Load Balancer on AWS using Ansible

    Task Description: ??Provision EC2 instances through ansible. ?? Retrieve the IP Address of instances using the dynamic…

    2 条评论
  • Deploying Webserver on AWS using Ansible

    Deploying Webserver on AWS using Ansible

    This task involves the following steps: 1. Launching an EC2 instance.

    2 条评论
  • Deploying WordPress application on Kubernetes with AWS RDS using terraform

    Deploying WordPress application on Kubernetes with AWS RDS using terraform

    The Objective of the task was to 1.?Write an Infrastructure as code using terraform, which automatically deploy…

    13 条评论
  • Task 1 - Ansible

    Task 1 - Ansible

    STEPS TO DO THIS TASK : ?? Configure Docker ?? Start and enable Docker services ?? Pull the httpd server image from the…

    2 条评论
  • Objectives: -

    Objectives: -

    Perform the task-1 using EFS instead of EBS service on the AWS as, Create/launch Application using Terraform 1. Create…

    2 条评论
  • Creating a VPC using NAT Gateway and Integrating it with EC2

    Creating a VPC using NAT Gateway and Integrating it with EC2

    STEPS: 1. Write an Infrastructure as code using terraform, which automatically create a VPC.

    2 条评论
  • Creating VPC and integrating it with Ec2

    Creating VPC and integrating it with Ec2

    STEPS: 1) Write a Infrastructure as code using terraform, which automatically create a VPC. 2) In that VPC we have to…

    5 条评论
  • Multi Node Kubernetes Cluster

    Multi Node Kubernetes Cluster

    Here we are creating multi node kubernetes cluster by using one master and two slaves. Step1:- Install rhel 8 in your…

    9 条评论
  • Task 1: -

    Task 1: -

    1. Create the key and security group which allow the port 80.

    12 条评论

社区洞察

其他会员也浏览了