Overview of Amazon Kubernetes Service

What is a Container?

Containers are basically lightweight standardized units that has the ability to package whole application code, libraries, configurations written in any programming language across various hardware architectures. They are very useful for running microservices based architecture as they are very agile and scalable and they can take benefits of the compute that they run on. Various companies like Google, YouTube, Facebook,etc. applications runs in containers.

What is Kubernetes?

It is one of the most popular ways to run the containers at scale. It is basically an open source platform that eliminates manual processes that are required in deploying and scaling containerized applications. It has the following advantages:

  1. Self Healing: It has the ability to restart containers when they fail and kills containers that does not responds.
  2. Load Balancing: It has the ability to distribute the network traffic whenever traffic to a particular container is high so that the deployment can be stable.
  3. Auto-Scaling : It has the ability to increase the number of nodes as the services demand increases.
  4. Service discovery: It has the ability to make our each individual component of microservices automatically discover each other without the need of hard coding IP addresses or endpoint configuration.

What is Amazon Elastic Kubernetes Service?

It is a managed Kubernetes services that is used for running Kubernetes in the AWS cloud. It manages Kubernetes management infrastructure across AWS to avoid single points of failure. It offers a standardized and completely supported Kubernetes solution with integrated tooling and simple deployment. We can use it to deploy our application across multiple environment, to create machine learning models and its workflow and run big data applications like Apache, Hadoop directly on Kubernetes. Businesses can get complete benefit from the dependability, performance and scale of the AWS platform by using Amazon EKS which depends on connections with its networking and security services.

Amazon EKS works by initiating and handling our Kubernetes control plane and worker nodes. Kubernetes is made up of two major components: a cluster of ‘worker nodes’ that run our containers and a control plane that manages where and when containers are started on our cluster while monitoring their statuses. It ensures high availability by running and scaling the Kubernetes control plane over many availability zones of AWS.

Source: Amazon EKS

To know more Amazon EKS you can watch this video.

Source: Amazon EKS

Prerequisites to do before creating Kubernetes cluster on Amazon EKS

Now we will be doing some installations before we start working with Amazon EKS. Initially, we need to connect our virtual machine with the Bitvise client. If you have not done that yet, you can use this link, Connecting BitVise to VM.

1. First we need to install “eksctl” command to create and manage Kubernetes clusters.

To check whether it is already installed or not, this command can be used,

eksctl version

If it is already installed, then below output will get displayed, otherwise we need to install eksctl on our system.

0.113.0

To install on our Linux system, first we need to use this command to download its latest release.

curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp

Then, to move the extracted binary to /usr/local/bin, use this command

sudo mv /tmp/eksctl /usr/local/bin

This would have installed eksctl on your system. To confirm the installation, use this command.

eksctl version

2. Now, we will install another command line tool that will be useful for the communication with Kubernetes API Server ,i.e. ‘kubectl’.

To check whether it is already installed or not, use this command,

kubectl version | grep Client | cut -d : -f 5

If already installed you will get output like this:

"v1.23.7-eks-4721010", GitCommit

If not already installed, use the below command to download the kubectl binary for our Kubernetes version from Amazon S3. The first command is for users with amd64 and the second command is for users with arm64.

curl -o kubectl https://s3.us-west-2.amazonaws.com/amazon-eks/1.23.7/2022-06-29/bin/linux/amd64/kubectl
curl -o kubectl https://s3.us-west-2.amazonaws.com/amazon-eks/1.23.7/2022-06-29/bin/linux/arm64/kubectl

You can check SHA-245 sum for your downloaded binary by,

openssl sha1 -sha256 kubectl

Now you can apply execute permissions to the binary using the below command

chmod +x ./kubectl

AS the next step, we will be copying the binary to a folder in our path

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

Now kubectl is installed on your system to verify and confirm its installation with this command

kubectl version --short --client

You will get a output like this:

3. Lastly, we will install AWS CLI in our Linux system.

Before starting this step we need to make sure that our Security Credentials with access key ID and secret access key are ready with us. If you don’t have credentials downloaded with you, no worries, we can download it again. Just follow these steps:

  1. Navigate to IAM console.
  2. On the left panel under Access Management select User -> Select and click your username.
  3. Go to security credentials -> under Access Keys click “Create Access Key”.
  4. Now you can see your Access key ID and Secret Access Key. To save it for future you can download .csv file.

Since, now we have our credential with us, go back to your terminal and type this command:

aws configure

It will ask you four things:

  1. AWS Access Key ID – Enter access key ID from your credentials
  2. AWS Secret Access Key – Enter secret access key from your credentials
  3. Default region name – You can enter us-east-2
  4. Default output format – You can enter JSON

Now we are done with all the pre-installations that are required to make and run our cluster. In the next blog, we will be discussing on how to make your first clusters, view your Kubernetes resources, deleting your clusters and much more.

Thank You!!