Why should you choose “Amazon Elastic Kubernetes Service” ?
Everything starts from here: “Getting started with Amazon EKS — Amazon EKS”
Amazon Elastic Kubernetes Service (EKS) is a managed Kubernetes service that makes it easy to run Kubernetes on AWS.EKS provides a high-level Kubernetes control plane that runs on AWS managed infra.This means that you don’t have to worry about managing the Kubernetes control plane, which can be complex and time-consuming.
Most cool features:
a) Autoscaling: EKS can automatically scale your Kubernetes cluster up or down based on the demand for your application.
b) Load balancing: EKS can automatically load balance traffic across your Kubernetes pods.
c) Networking: EKS provides a managed Kubernetes networking solution that makes it easy to connect your Kubernetes pods to each other and to the outside world.
d) Secrets and configuration management : EKS provide a managed secrets and configuration management solution that makes it easy to store and manage sensitive data and configuration for your Kubernetes applications.
Prerequisite:
1) Install or update AWS CLI for windows :“https://awscli.amazonaws.com/AWSCLIV2.msi”
2) Latest version of the kubectl binary for Windows: “ curl.exe -O https://s3.us-west-2.amazonaws.com/amazon-eks/1.27.4/2023-08-16/bin/windows/amd64/kubectl.exe ”
3) Required IAM permissions : “ https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonelastickubernetesservice.html "
- Add the following policy to the IAM user .
For more reading :-
Installing aws-iam-authenticator “Installing aws-iam-authenticator — Amazon EKS”
Creating or updating a kubeconfig file for an Amazon EKS cluster using local host terminal: “Install or update the latest version of the AWS CLI — AWS Command Line Interface (amazon.com)”
- After the downloading copy kubectl.exc to c:/bin/ folder of the c drive.
“cp kubectl.exc c:/bin/”
- Configuration cluster :open EKS in theaws console, and add a cluster > create ,provide name and version . You can add a role if you have created it in IAM. The last step is to tag your EKS.
- Networking : Provide the VPC or use default one , and specify the subnet as well. In the security group, you can go with default options.
note: Default installation are :Amazon VPC CNI “Enable pod networking within your cluster” Kube-proxy “Enable service networking within your cluster” CoreDNS “Enable service discovery within your cluster”
- review and create: Create “Now your EKS is created”
Now execute this commands one by one on your host terminal :
4) To get the status of the Amazon EKS cluster , use this command “aws eks — region ap-south-1 describe-cluster — name My_demo_EKS — query cluster.status”
5) To update kubeconfig file for the Amazon EKS cluster usecommand : “aws eks — region ap-south-1 update-kubeconfig — name My_demo_EKS”
6) check : kubectl get svc
7) Now we can create a working node in this cluster : go to your Clusters > click on the cluster . select configuration > clicl on compute .
Now a page will open for “Configure Node Group”
step 1 : Configure Node Group
Give name , in IAM role select or create IAM role as :
eks cni policy , amazon eks worker node policy , AmazonEC2ContainerRegistryReadOnly
- Add tag if required and click next.
Step 2 : Set compute and scaling configuration.
- I changed instance type to t2.micro with Disk size 10 gb.
- I kept default for all others and click next.
Step 3 : Specify networking.
- Keep default or you can change your subnets. > click next.
Step 4 : Review and create .
- review everything and click create.
- You can check in your host terminal by “kubectl get nodes — watch” or “kubectl get nodes”.
Thank you for reading the simple demo .