Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samankhalife/ansible-simple-k8s-cluster
This Ansible playbook sets up a Kubernetes cluster for you with one master and two workers, designed for educational purposes. For production environments, it's recommended to use Kubespray.
https://github.com/samankhalife/ansible-simple-k8s-cluster
ansible ansible-playbook calico-cni docker-cri kuberentes kubernetes-cluster ubuntu-server
Last synced: 4 days ago
JSON representation
This Ansible playbook sets up a Kubernetes cluster for you with one master and two workers, designed for educational purposes. For production environments, it's recommended to use Kubespray.
- Host: GitHub
- URL: https://github.com/samankhalife/ansible-simple-k8s-cluster
- Owner: SamanKhalife
- License: mit
- Created: 2024-07-10T17:13:15.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-12T19:01:38.000Z (4 months ago)
- Last Synced: 2024-07-12T21:18:18.530Z (4 months ago)
- Topics: ansible, ansible-playbook, calico-cni, docker-cri, kuberentes, kubernetes-cluster, ubuntu-server
- Language: Shell
- Homepage:
- Size: 43.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ansible-Simple-k8s-Cluster
This Ansible playbook sets up a Kubernetes cluster with one Master and two Workers (Tested on Ubuntu 22.04 and Ubuntu 24.04 ), designed for educational purposes. For production environments, it's recommended to use [Kubespray](https://github.com/kubernetes-sigs/kubespray).
## Prerequisites
1. Set up SSH configuration (based on RSA keys) between the master and worker nodes.
2. Install Ansible on the master node (Ansible makes changes locally to the master node).## Steps to Set Up the Cluster
### 1. Configure Host Variables
Update the default values in the [host_vars](https://github.com/SamanKhalife/Ansible-Simple-k8s-Cluster/tree/main/host_vars) directory with your master and worker nodes' IPs or domains.
Verify the connection:
```bash
ansible all -m ping
```### 2. Run the Playbook
Navigate to the playbook directory and execute the playbook:
```bash
cd playbooks
ansible-playbook cluster.yml
```### 3. Be Patient
Wait for a few minutes for the Kubernetes cluster to be set up and running.
## Additional Information
For more advanced or production-ready setups, consider using [Kubespray](https://github.com/kubernetes-sigs/kubespray).