Deploying a Kubernetes cluster is a time consuming and boring job so I created a project for solving this issue.
Here is the project: https://github.com/ridvanaltun/kubernetes-vagrant
Just follow the below steps:
# Install the plugin for Vagrant to ability to use environment files. $ vagrant plugin install vagrant-env # Clone the project. $ git clone https://github.com/ridvanaltun/kubernetes-vagrant.git # Go into it. $ cd kubernetes-vagrant # Don't forget to customize your own environment file. $ cp .env.example .env # Up one master and two worker node. # This takes approximately ~15 minutes if you using first time. $ vagrant up m n1 n2 # Connect to master node over SSH. $ vagrant ssh m # You can do everything you want, an example, list nodes. $ kubectl get nodes
It is simple like that.