This repository provides a set of files that allows the deployment of a kubernetes cluster formed by VirtualBox vms. The information used to create these files was retrieved from this blog post written by Naresh L J (Infosys). However original post has some issues that were fixed. The fixed issues are commented here.
- VirtualBox - 6.0.14r133895
- Ansible - 2.9.1
- Python - 3.7.5
Tests were executed under MacOS Mojave - 10.14.6.
- Retrieve git repository
git clone https://github.com/josanabr/ansible-k8s
- Visit directory
cd ansible-k8s
- Execute
vagrant up
- Go to
k8s-master
via ssh.vagrant ssh k8s-master
- Check if nodes are up and running.
kubectl get nodes
- Visit the directory
/vagrant/test
.cd /vagrant/test
- Deploy an example app (taken from here).
kubectl apply -f deployment.yaml
- Check that everything is working.
kubectl get pods -A