Skip to content

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.

License

Notifications You must be signed in to change notification settings

samankhalife/Ansible-Simple-k8s-Cluster

Repository files navigation

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.

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 directory with your master and worker nodes' IPs or domains.

Verify the connection:

ansible all -m ping

2. Run the Playbook

Navigate to the playbook directory and execute the playbook:

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.

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages