Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0xzer0x/kubernetes-the-ansible-way
Bootstrap a Kubernetes cluster from scratch, the Ansible way.
https://github.com/0xzer0x/kubernetes-the-ansible-way
ansible ansible-playbook ansible-role cnf cni cni-plugin container containerd containers coredns flannel kubernetes kubernetes-cluster kubernetes-the-ansible-way kubernetes-the-hard-way pods vagrant vagrantfile
Last synced: 4 days ago
JSON representation
Bootstrap a Kubernetes cluster from scratch, the Ansible way.
- Host: GitHub
- URL: https://github.com/0xzer0x/kubernetes-the-ansible-way
- Owner: 0xzer0x
- License: gpl-3.0
- Created: 2024-07-13T18:10:08.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-17T07:21:57.000Z (6 months ago)
- Last Synced: 2024-11-16T23:28:09.584Z (2 months ago)
- Topics: ansible, ansible-playbook, ansible-role, cnf, cni, cni-plugin, container, containerd, containers, coredns, flannel, kubernetes, kubernetes-cluster, kubernetes-the-ansible-way, kubernetes-the-hard-way, pods, vagrant, vagrantfile
- Language: Jinja
- Homepage:
- Size: 78.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🚀 Kubernetes The Ansible Way
Deploy a Kubernetes cluster from scratch using Vagrant and Ansible. This project is based on the [kubernetes-the-hard-way](https://github.com/mmumshad/kubernetes-the-hard-way) repository and uses Ansible to perform all the tasks required, from creating and signing certificates for different components, setting up nodes by adding proper kernel modules, downloading Kubernetes components binaries and adding DNS entries for each node, generating kubeconfigs, installing container runtime containerd, and configuring cluster networking and internal DNS.
📋 Table of Contents
- 🎥 Demo Video
- 📖 Introduction
- 🏗️ Architecture
- 🚀 Get Started
- 🛠️ Technologies Used
- 🌟 Acknowledgements
- 📜 License
## 🎥 Demo Video
[![Watch the video](https://img.youtube.com/vi/nikDHKM5pcA/maxresdefault.jpg)](https://youtu.be/nikDHKM5pcA)
## 📖 Introduction
**Kubernetes the Ansible way** is a project designed to simplify the process of deploying a Kubernetes cluster using Ansible and Vagrant. It automates the steps outlined in the **Kubernetes the hard way** guide, making it easier for you to set up a Kubernetes cluster from scratch.
## 🏗️ Architecture
| Component | IP Address | Description |
| ---------------- | ------------- | -------------------- |
| `controlplane01` | 192.168.56.11 | Control Plane Node 1 |
| `controlplane02` | 192.168.56.12 | Control Plane Node 2 |
| `loadbalancer` | 192.168.56.30 | Load Balancer |
| `node01` | 192.168.56.21 | Worker Node 1 |
| `node02` | 192.168.56.22 | Worker Node 2 |
## 🚀 Get Started
### Prerequisites
Ensure you have the following tools installed on your system:
- [Vagrant](https://www.vagrantup.com/downloads)
- [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)
### Usage
Clone the repository and navigate into the directory:
```bash
git clone https://github.com/0xzer0x/kubernetes-the-ansible-way
cd kubernetes-the-ansible-way
vagrant up
```
This will deploy the entire Kubernetes cluster, including:
- 🖥️ Setting up nodes with proper kernel modules
- 🔒 Creating and signing certificates for different components
- 📦 Downloading Kubernetes components binaries
- 🌐 Adding DNS entries for each node
- 🗂️ Generating kubeconfigs
- 🐳 Installing the container runtime `containerd`
- 📡 Configuring cluster networking with Flannel
- 🌐 Setting up internal DNS with CoreDNS
## 🛠️ Technologies Used
- **Vagrant**: Tool for managing virtual machine environments.
- **Ansible**: Automation tool for configuration management and application deployment.
- **HAProxy**: High availability load balancer for efficient traffic distribution.
- **Containerd**: Core container runtime used in container orchestration.
- **Flannel**: Lightweight network fabric designed for Kubernetes.
- **CoreDNS**: DNS server for Kubernetes internal DNS resolution.
## 🌟 Acknowledgements
Special thanks to [kubernetes-the-hard-way](https://github.com/mmumshad/kubernetes-the-hard-way/) for providing the foundational steps and guidance used in creating this project.
## 📜 License
This project is licensed under the GPL v3 License. See the [LICENSE](LICENSE) file for details.