AWS EKS Cluster

AWS EKS Cluster

What is EKS ?

EKS is a managed service for kubernetes Cluster by AWS . EKS Stands for Elastic Kubernetes Service ,in this service kubernetes master is totally managed by AWS unlike normal kubernetes clusters which are totally managed by us .Here we only have to manage our slave Nodes .

As EKS is provided by Amazon so we can also integrate it with EBS, EC2, EFS and many more services.

No alt text provided for this image

Here we are going to launch a Multi Node Cluster on EKS ,further on it we will launch wordpress and all this we are going to perform using Command line interface.

Some pre-requisites ...

  1. AWS account
  2. Command line tools for AWS,KUBECTL,EKSCTL

Now we will start by making cluster first ,in this we have to make a folder first in command prompt

>mkdir eksfoldername

>cd eksfoldername

then create notepad file for cluster and paste below code here

>notepad mycluster.yml

No alt text provided for this image

now run this cluster and do further things given below

No alt text provided for this image

Then update your kubeconfig file and create a namespace

No alt text provided for this image

After this create the following notepad files in ur eksfolder

No alt text provided for this image

Mysql file

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

For deploying the Wordpress and other files on EKS cluster we need below code in .yml format

Wordpress

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

Efs provisioner

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

Storage

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

As we dont want to run these all files manually so we have to create a kustomization file for this and which will run these files in our desired sequence and will also contain the secret thst is the username and password for mysql .

Kustomization

No alt text provided for this image

Now we are going to create efs in aws account using GUI and will get a file id

No alt text provided for this image

now create a secret

No alt text provided for this image

create all files

No alt text provided for this image

you can see pods are running and loadbalancers are also created

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

Then if you just paste your SVC link on browser you can see wordpress portal and can write a blog on it which is the final motive of this article.

No alt text provided for this image


No alt text provided for this image

NOTE: After completing this whole task we should always delete our whole cluster environment because EKS is not a free servive.

use below command to delete

#eksctl delete cluster -f mycluster.yml

..

..

THANK YOU


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

Mahima Jindal的更多文章

社区洞察

其他会员也浏览了