Aws EKS task
AK Panchal
DevOps Engineer | Cloud & Infrastructure Automation | Docker | Kubernetes | AWS | Open Source | Web3 Enthusiast | Developer Advocate | Community Management | Technical Evangelist | Explorer
Aws eks:-
Amazon Elastic Kubernetes Service (EKS) is a managed Kubernetes service that makes it easy for you to run Kubernetes on AWS without needing to install, operate, and maintain your own Kubernetes control plane.
Benefits:-
High Availability,Serverless option,Secure,Built with the Community
For further info:-https://aws.amazon.com/eks/
How it’s work:-
What is aws deployment:-
AWS CodeDeploy is a fully managed deployment service that automates software deployments to a variety of compute services such as Amazon EC2, AWS Fargate, AWS Lambda, and your on-premises servers. ... The service scales to match your deployment needs.
IAM :-
AWS Identity and Access Management (IAM) enables you to manage access to AWS services and resources securely. Using IAM, you can create and manage AWS users and groups, and use permissions to allow and deny their access to AWS resources.
IAM is a feature of your AWS account offered at no additional charge. You will be charged only for use of other AWS services by your users.
For more:-https://aws.amazon.com/iam/
Kubernetes:-
Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.
For more:- https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/
Required tools:-
- AWS CLI configure
- EKSCTL configure
- KUBECTL configure
- set the path of exe file of these tool
Task description:-
deploy the Wordpress with the MySQL as the database using the AWS EKS cluster.
- Create a Kubernetes cluster using AWS EKS service.Integrate EKS with multiple services like the EC2,Block storage, Load Balancer, Security Groups.Deploying WordPress & MySQL on top of AWS EKS.
Step 1:-First to create IAM user with admin power access after creation user pannel
Step2:- after creation we configure aws on cli we check
#aws --version #eksctl version #kubectl version
Create a folder to store the code file on desktop
#cd desktop #cd eks_class_code
now configure aws
aws configure
step3:_- create cluster
to write the code and create cluster use following command notepad cluster_name.yaml eksctl create cluster -f cluster_name.yaml
for update kube configuration use following command
aws eks update-kubeconfig --name mycluster
step 4:- EFS file system
used for:- Amazon EFS provides a durable, high throughput file system for content management systems and web serving applications that store and serve information for a range of applications like websites, online publications, and archives.
create EFS file system we download efs utils .install by following commands
ssh -i key-eks.pem -l ec2-user 13.232.61.42 sudo su - root yum install amazon-efs-utils
create namespace
Kubectl create ns lwns kubectl config set-context --current --namespace=lwns
step 5:- create provisioner,rbac,mysql,wordpress yaml file to create and deploy
create efs-provisioner.yaml
now giving roll binding permission , create rbac.yaml
now deploy wordpress mysql
create mysql
create wordpress
now run all the file on cli
step 6:- now we access wordpress using ELB ext. IP
Aws Fargate
AWS Fargate is a serverless compute engine for containers that works with both Amazon Elastic Container Service (ECS) and Amazon Elastic Kubernetes Service (EKS). Fargate makes it easy for you to focus on building your applications. Fargate removes the need to provision and manage servers, lets you specify and pay for resources per application, and improves security through application isolation by design.
Fargate allocates the right amount of compute, eliminating the need to choose instances and scale cluster capacity. You only pay for the resources required to run your containers, so there is no over-provisioning and paying for additional servers. Fargate runs each task or pod in its own kernel providing the tasks and pods their own isolated compute environment. This enables your application to have workload isolation and improved security by design. This is why customers such as Vanguard, Accenture, Foursquare, and Ancestry have chosen to run their mission critical applications on Fargate.
working:-