EKS TASK
Srishti Jain
DevOps Engineer || Azure 1x || CI/CD || AKS || Jenkins || Kubernetes || Git
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.
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
you can go to aws console and check the progress of cloud formation stack while the cluster is launching.
after few mins you can see your cluster have been launched
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: -
to check the nodes and describe the nodes we have following command: -
you can also see your nodes in Ec2 service of aws
to get the information regarding the cluster , use following command
now we will create a namespace and set is as default
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
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
here in the pod of IP 192.168.6.226 I have made the changes in the PHP file
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.
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.
you can also check it in the EBS service of AWS
Now , we will see how many pods are running inside the kube-system
now , we are going to create a multitier architecture of Wordpress and MySQL using a single yml file known as kustomization.yml
now anyone who knows the DNS of my load balancer can access my Wordpress site easily
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.
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
as you can helm and tiller are ready so now by using them we will install prometheus
and our prometheus has been installed and working properly so now we will install grafana
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.
and after 15-20 mins our fargate cluster will be launched.
Ansible || Hybird Multi Cloud Enthusiast || Docker || AWS || Openstack || Terraform || EKS || Python || Linux Administration
4 年Thanks?
DevOps @Forescout ?? | Google Champion Innovator | AWS | DevOps | 3X GCP | 1X Azure | 1X Terraform | Ansible | Kubernetes | SRE | Jenkins | Tech Blogger ??
4 年Great work ?
Analyst @ Annalect | 5x Datorama Certified | DevOps | Cloud
4 年Great ??
Cloud Architect ? 6X Azure ? 1X Databricks ? ACE Certified ? MCT
4 年Good Work Srishti Jain
DevOps Engineer at Toorak Capital
4 年GreaT worK!!