by Technical Team at Avangels Tech

In this article, we will look at installing and configuring a single-node Kubernetes cluster on AWS. 

We have split this article into 5 parts.

Part 1 –> Introduction and Pre-requisites.

Part 2 –> Base OS (CentsOS-7) installation.

Part 3 –> Installing and configuring docker components.

Part 4 –> Installing and configuring Kubernetes components. 

Part 5 –> Creating and deploying the Kubernetes cluster.


Part 1


Kubernetes, also known as K8s, is an open-source system for automating the deployment, scaling, and management of containerized applications.

Containerized applications are applications that run in isolated runtime environments called containers. Containers encapsulate an application with all its dependencies, including system libraries, binaries, and configuration files.

What is a single-node Kubernetes cluster? A single-node cluster consists of a master node (called the control plane) and a worker node (called the data plane). 

Kubernetes deploys containers called pods in the Kubernetes world. Pods are the smallest unit provided by Kubernetes to manage containerized workloads. A pod typically includes several containers, which together form a functional unit or microservice.

Various cloud providers provide their own Kubernetes solutions, AWS’s EKS, Microsoft Azure’s AKS, Google’s GKE, etc. These are managed Kubernetes clusters and you pay the cloud provider a fixed fee for managing the control plane. The data-plane resources (virtual machines) are based on the application requirements. 

For our deployment, we will go with some assumptions and use some predefined OS and HW resources. 


The Kubernetes cluster will be deployed on AWS cloud.

We are assuming that you have a valid AWS account. (your account could be in a free tier period).

For this article, we have used AWS’s Asia Pacific (Mumbai) “ap-south-1” region, but you can deploy this in any region you choose. 

We will use the default VPC and subnets that are created at the time when you created your account. 

Ensure that the subnet has access to the internet gateway (IG).

For this Kubernetes deployment, we will use Centos 7, which supports the 64 bit (x86) virtual machines, as the OS for both the master and worker nodes.

We will create a new and dedicated user for administrating and monitoring the Kubernetes cluster. 

For the OS installation and initial configuration, we will use the following instance family types:


OS installation –> t2.micro (1 vCPU + 1 GB RAM) –> 1 No.

Kubernetes cluster –> t3a.medium (2 vCPU + 4 GB RAM) –> 2 Nos.

EBS –> 10 GB –> io1

We will create a new EC2 user “jenkins”. This user will be the admin and will do all the installations. By default when you use a CentOS-7 AMI, there is a default “centos” user, but we will not use the default “centos” user due to security reasons.



Below are the pre-requisites before installing the OS.



Step 1: Configuring key-pair.



Create a new Key-pair for SSH login to the EC2 instance

Log in to your Amazon Web Services console.

Services –> EC2.

In the left tab –> Network & Security –> Key pairs

On the top –> Create key pair 


Enter the below values:

Name –> jenkins     

Key pair type –> RSA

Private key file format –> .pem

Tags –> 

Key = Name

Value = jenkins_ssh_key_pair

Create key pair


***IMPORTANT*** Download the key on your desktop/laptop as file “jenkins.pem” and we will use this later. You will not be able to download the key again to ensure that it is downloaded as “jenkins.pem” or “jenkins.ppk” based on the platform that you are using. 

System platform compatibility:


    Linux users — .pem file format

    Mac users — .pem file format

    Windows PowerShell users — .pem file format

    Windows PuTTY/Cygwin users — .ppk file format        



 We are using mac OS, so we will be using the “jenkins.pem” file. The below steps need to be performed on the local computer for generating the public key.

    • $ chmod 700 “jenkins.pem”
    • $ ssh-keygen -y -f “jenkins.pem”


This generates a public key, which we will use when we create a new user in the OS for docker/kubernetes installation & configuration, so keep this key carefully. 




If you are using a Windows system, please refer to the below articles to generate the public key using the “*.ppk” file. 

Refer to the below article on how to use “.ppk” file using PuttyGen,client%2C%20it%20does%20not%20support%20.

This completes SSH key creation.



Step 2: Configuring Security groups.



By default, when you create an AWS account a default security group is created. For this article, we will use this security group for SSH and for Kubernetes activities. 

Ensure that the SSH port is added to the default security group so that we can log in to the EC2 instance.  

On the EC2 page 

On the left tab –> Network & Security –> Security Groups

Click on the default security group –> Inbound rules (tab) –> Edit inbound rules (tab)

Add the below :

Type = SSH

Protocol = TCP (picks up by default)

Port = 22 (picks up by default)

Source = (This means it can connect from any IP)

Description = Port for SSH (you can give any name/value)

Click –> Save rules (tab)


NOTE: For production systems, it is not advisable to use as it can be a security risk. It is OK for development and testing environments. 



This completes the prerequisites for the Kubernetes installation. In the next article, we will configure the centos-7 base OS which will be used for master and worker nodes.


Part 2 –> Installing the CentOS-7 system.