Here I'm tring play around with Kuberenets on Vagrant virtual machines (Virtualbox only): setup cluster, deploy monitoring service, database, custom applications, etc.
- Required software:
- VirtualBox (https://www.virtualbox.org/wiki/Downloads)
- Vagrant (https://www.vagrantup.com/downloads.html)
- Git
- Open command line, select directory and execute:
git clone https://github.com/nazarii-piontko/test-k8s-playground.git
cd test-k8s-playground
vagrant up
- Wait untill it finish.
- Add the following into your hosts file (
/etc/hosts
orc:\Windows\System32\Drivers\etc\hosts
):192.168.80.10 prometheus.k8s.local
192.168.80.10 grafana.k8s.local
192.168.80.10 api.k8s.local
There are three services/resources publicly availabe:
- Prometheus: http://prometheus.k8s.local
- Grafana: http://grafana.k8s.local
- Login: admin
- Password: admin
- Dummy REST API service written in Python with Falcon framework:
- Base URI: http://api.k8s.local
- POST request to add body string into MongoDB:
curl -X POST --data "Test Record" http://api.k8s.local
- GET request to get latest 10 records:
curl http://api.k8s.local