TOOL | VERSION | LINK |
---|---|---|
VirtualBox | latest | https://www.virtualbox.org/wiki/Downloads |
Vagrant | latest | https://www.vagrantup.com/downloads.html |
Clone repo if not already
git clone https://github.com/schoolofdevops/lab-setup.git
Launch environments with Vagrant
cd lab-setup/kubernetes/vagrant-kube-cluster
vagrant up
The above command will take some time and will download the image, setup VMs and configure those with everything required to configure the kubernetes cluster. This is also the setup where you may find and have to fix the majority of the issues.
Login to nodes
Open three different terminals to login to 3 nodes created with above command. For each terminal, before you run any vagrant command, make sure you are in the directory where Vagrantfile is.
Terminal 1
cd lab-setup/kubernetes/vagrant-kube-cluster
vagrant ssh kube-01
sudo su
docker version
which kubectl
which kubeadm
which kubelet
Terminal 2
cd lab-setup/kubernetes/vagrant-kube-cluster
vagrant ssh kube-02
sudo su
docker version
which kubectl
which kubeadm
which kubelet
Terminal 3
cd lab-setup/kubernetes/vagrant-kube-cluster
vagrant ssh kube-03
sudo su
docker version
which kubectl
which kubeadm
which kubelet
If you see the output for above commands, your environment is ready for kubernetes cluster setup.