Today everyone knows that Amazon Web Services(AWS) is a leading global provider of cloud services, and Kubernetes is gaining attention as a powerful tool to deploy and maintain containers in production environments. Many people love to use Kubernetes, but the hard part of cluster management can be a drawback to it, to cater to this issue we have the solution in the form of Amazon EKS (Amazon Elastic Kubernetes Service ) which helps in making Kubernetes clusters in a fast and easy way.
Many big companies like AWS, Oracle, Microsoft, VMware have been linked to CNCF and adopted the use of Kubernetes, and this has led to a rise in its use and popularity exponentially.
Although the latest versions of Kubernetes made the deployment of clusters an easy process there are still some challenges to its widespread popularity. Although you could get used to with the use of pods, containers, services and replication controllers, concepts like networking, load balancing, and monitoring are a big challenge to understand and manage.
As we know that containers were always there, we call them Docker in the current time. Amazon Elastic Kubernetes Service has simplified the use of Kubernetes on AWS/Cloud hence removing the effort of setting it up on a personal control-plane. It takes care of upgrades & patching.
EKS - Cloud Trail are together used to track user and cluster activity. Cloud Trail captures the API calls coming to EKS.
Logs for K8s can be seen in Amazon CloudWatch.
Running clusters can be updated without removing old clusters or creating new clusters. It offers compatibility with add-ons like CoreDNS used to create DNS service, web-based UI called Kubernetes Dashboard and kubectl a utility used to access and manage clusters. Control plane in K8s knows how talking happens between K8s and cluster:
Benefits of EKS
It is a software using which we can perform deployment and management of containers. Kubernetes provides features like scalability using which we can extend containers as we want.
But, it also has some drawbacks such as too much time is consumed in cluster deployment using master and worker nodes. The solution to this is Amazon EKS.
K8s word is a Greek word, which means a pilot. It was open-sourced in 2014. It is built upon google long term experience. Containers help to bundle and run code. We need to control containers that have applications in them. If a container crashes another container takes its place. This thing can be controlled as well. K8s is the answer to this.
Benefits like scaling containers are provided using this.
Let us understand the working of EKS using below steps. Trust me they are easy :)
Let’s deploy an Nginx application on Kubernetes with the help of Amazon EKS.
1). AWS IAM service role and a VPC
Create an IAM role for Kubernetes to use AWS resources
Create a Virtual Private Cloud (VPC) for cluster deployment.
2). Create an Amazon EKS cluster
3). Setup Kubectl
Kubectl is a utility used to talk to clusters.
kubectl package comes in built-in most of OS packages hence easy in installation.
Have the latest version of the AWS CLI installed?
Configure Kubectl to talk to your cluster
4). Launch and configure Amazon EKS worker nodes
Launch worker nodes only when the cluster is ACTIVE. Launching them before the cluster is up will not allow them to register with the cluster. Let’s join worker nodes to K8s cluster by the below steps:
On Next page, press Next
Let’s join worker nodes to Kubernetes cluster by below steps:
kubectl apply –f aws-auth-cm.yaml
kubectl get nodes
Nodes should be visible in Ready state.
5). Launch a simple Nginx application
Create a file nginx.yaml and populate the details below:
Create a file nginx-svc.yaml and populate details below:
kubectl create –f nginx.yaml
kubectl create –f nginx-svc.yaml
kubectl get services –o wide
kubectl describe svc nginx ## LoadBalancer Ingress will be the ip to get the landing page of Nginx.
Useful Kubernetes tools.
Finally – some cherry on the cake.
Some useful tools used with Kubernetes.
Kube Cluster Deployment Tools
Helpful CLI Tools
With this write-up, you have learned fundamentals of Amazon EKS and some amazing practices of it. If you have any further queries related to it then drop your query in the comment below. Happy learning!
A DevOps Engineer by profession and a Technical Blogger by passion. I love to learn anything about DevOps and Cloud computing and at the same time share the knowledge among those who are willing to learn and share the same passion with me.
Course for testing
Receive Latest Materials and Offers on AWS Course