Create a complete Kubernetes Cluster

Create a complete Kubernetes Cluster

Project to create a Kubernetes Cluster in a programmatic and repeatable way.

Many existing solutions for setting up Kubernetes clusters are either incomplete or no longer actively maintained. After encountering inconsistencies and outdated features in these solutions, I’ve decided to create a series of posts detailing the process of building a Kubernetes environment from scratch, starting on my cluster of six Raspberry Pis before extending it to AWS, covering all essential configuration dependencies.

The journey begins with defining the environment and utilizing Terraform to establish network infrastructure, generate security keys, and configure servers when moving to AWS. Initially, on the Raspberry Pi cluster, we’ll manually configure nodes to understand the foundational setup of Kubernetes on ARM architecture. This setup will allow us to seamlessly transition to the cloud with the flexibility of tearing down and recreating the environment as needed.

Following this, we’ll use Ansible to automate configuration steps for Kubernetes, focusing on high availability, robust networking, and best practices. With a production-level Kubernetes cluster in mind, we’ll emphasize secure networking policies and role-based access control (RBAC), anticipating future integration with CI/CD pipelines.

As I progress through each stage, I will update this post with links to the detailed guides:

  • Starting with Environments & Servers - Building a Kubernetes Cluster (Part 1)
  • Kubernetes Master & Worker Node Configuration on Raspberry Pi (Part 2)
  • Extending to AWS and Automating Infrastructure with Terraform (Part 3)
  • Setting Up Networking and Ingress (Part 4)
  • Configuring Storage and Persistence (Part 5)
  • Automating with CI/CD Integration - Building a Kubernetes Cluster (Part 6)

Pre-Requisites

  • Raspberry Pi Cluster with at least three nodes (I’m using six)
  • AWS Account (for later stages)
  • Command-line installed and configured for AWS
  • AWS credentials file configured ~/.aws/credentials