Friday, February 4, 2022

How To Configure AWS EKS Cluster And Worker Nodes.

What Is AWS EKS ?

Elastic Kubernetes Service - is a cloud-based container management service that natively integrates with Kubernetes to deploy applications.



Below Task Will Cover....

Task 1) Create IAM USER 

- attach admin policy or respacted polices.
- keep programatic access keys

Task 2) Login Via IAM User & Create EKS Cluster

- create 'cluster-service-iam-role'
- attach 'EKS:EKS-Cluster' service.
- create EKS service by iam user

Task 3) Install Kubectl Utility In Client Linux Machine

- install aws cli tool
- configure aws cli by iam user keys.
- access you EKS cluster

Task 4) Configure WorkerNode For EKS Cluster

- create iam role for nodes
- configure worker node group for eks cluster 

Task 5) Use Kubernets master service in Client Machine


What Is AWS EKS ?

Elastic Kubernetes Service - is a cloud-based container management service that natively integrates with Kubernetes to deploy applications.


Task 1) Create IAM USER


- Attach admin policy or respected polices to IAM USER.
- Tick on programmatic access & AWS Management Console access 


Task 2) Login Via IAM User &  Create EKS Cluster


- create 'iam-cluster-service-role'

- Attach 'EKS
:EKS-Cluster' service.



- create EKS service by iam user




Task 3) Install Kubectl Utility In Client Machine

https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html

- Download the Amazon EKS vended kubectl binary for your cluster's Kubernetes version 1.21

$ curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.21.2/2021-07-05/bin/linux/amd64/kubectl


- Apply execute permissions to the binary.

$ chmod +x ./kubectl


- Copy the binary to a folder in your PATH.

$ mkdir -p $HOME/bin && cp ./kubectl $HOME/bin/kubectl && export PATH=$PATH:$HOME/bin


- Verify Kubectl version

$ kubectl version --short --client


- install aws cli tool in ubuntu 

$ sudo apt-get install awscli


- configure aws cli by below command.

$ aws configure


-t3.7 Enter your IAM user access & secreat key with region.


- Access you EKS cluster by follwing Commands.
(Replace region & clustername)


$ aws eks --region ap-south-1 describe-cluster --name "eks-cluster" --query cluster.status
$ aws eks --region ap-south-1 update-kubeconfig --name "eks-cluster"


$ kubectl get svc
$ kubectl get all



Task 4) Configure WorkerNode For EKS Cluster


- Create IAM role For nodes

- attach following polices to role and create user 

  • AmazonEC2ContainerRegistryReadOnly
  • AmazonEKSWorkerNodePolicy
  • AmazonEKS_CNI_Policy


- EKS >> Cluster >> Cluster-Name >> Compute >> Click On ADD Node Groups



- Create node Group


- Set compute and scaling configuration



- Specify networking



- Node Group creation in progress




Task 5) Use Kubernets master service in Client Machine


- Run Following Commands

$ kubectl get nodes --watch
$ kubectl get svc
$ kubectl get nodes


- Write a manifest and apply it.


$ kubectl get pods
$ kubectl get all

No comments:

Post a Comment

testing