Deploy HA kubernetes cluster in AWS in less than 5 minutes.

website uptime

One of the tasks that interest me most in my work is to automate. Automation is very important in the world of Devops since it allows you to have version control and saves you a lot of time when managing a complete infrastructure.

In this article I am going to show you how to use a repository that I created with a series of scripts and tools, which allow you to deploy a cluster of kubernetes in the AWS cloud without much effort. This cluster can be in HA or not.

I have used Terraform to create resources in AWS such as EC2 instances, security groups, load balancers, etc. additionally I use Ansible to do the cluster installation and packages necessary to have it up and running.

The steps of how to create the cluster are explained in the README section of the repository. If you have any questions or problems you can create an issue on github and I will be happy to help you.

Below you can see an example video of creating resources in AWS with terraform when you run the ./terraform apply -var-file = credentials.tfvars command and create the necessary resources for a 3 Master and HA cluster 3 Worker nodes.

Also below is a video of when the cluster is installed with Ansible with the command ansible-playbook -i inventory / hosts --private-key ssh-key.pem --become -u ubuntu --become-user = root cluster.yml as explained in the README of the repository.

As inspiration for this repository, use some code from kubespray but removing the complexity that this repository has for its use.

As always, if you have any question or comment, drop me a message to

Back to blog