This is to provision CentOS Virtual Machines and setup a Kubernetes cluster using ansible. The created machines are
- Control VM with Ansible
- Kubernetes Master
- Kubernetes Node
It spins up 3 VMs in Virtual Box with the following configuration:
- OS: CentOS 7
- Memory: 2048
- CPU: 2
-
Download and Install VirtualBox for your OS: https://www.virtualbox.org/wiki/Downloads
-
Download and Install Vagrant for your OS: https://www.vagrantup.com/downloads.html
-
Generate a private and public key on your machine on the following location:
~/.ssh/id_ansible
using the following commandssh-keygen -t rsa -b 4096 -C "ansible"
In order to execute the script run:
vagrant up
In order to remove all the 3 VMs created by vagrant run:
vagrant destroy -f