Skip to content

Latest commit

 

History

History
48 lines (28 loc) · 2.07 KB

README.md

File metadata and controls

48 lines (28 loc) · 2.07 KB

Kubernetes lab deployed with Ansible and MicroK8s

This project is capable of easily and automatically initializing a laboratory MicroK8s cluster with N nodes (VirtualBox VMs) with the aim of experimenting and developing on this orchestration technology.

To do this, it uses a multi-machine Vagrantfile and an Ansible playbook capable of installing MicroK8s and initializing the cluster (In simple words, it turns the MicroK8s getting started documentation into an Ansible playbook).

The vagrantfile includes constants to parameterize: total number of nodes (machines), base box, IP range of the private network and number of cores and RAM assigned to each node. The ansible provisioner is invoked only when all nodes are up and running.

Requirements

For the execution of this project it is necessary to have the following tools installed in your host:

How to use

Once the repository is cloned, simply go to the root directory of the project.

Duplicate and rename the vars.yml.example file to vars.yml. In it you can define the variables according to what you need.

labs-microK8s-ansible git:(master) ✗ cp vars.yml.example vars.yml && nano vars.yml

Edit the constants in the Vagrantfile if necessary (total number of nodes, base box, IP range of the private network and number of cores and RAM assigned to each node)

labs-microK8s-ansible git:(master) ✗ nano Vagrantfile

Finally, provision the environment:

labs-microK8s-ansible git:(master) ✗ vagrant up

That's it! You can now log into your nodes via vagrant (vagrant ssh node1) or directly via SSH with the correct username and IP (ssh [email protected]).

License

GNU GPLv3

Author Information

@santiagomr