- Step 1:- Download Virtual Box and Install it on your OS
- Step 2:- Download Vagrant and Install it (It needs to ask for restart).
- Step 3:- Download Git and Install it.
- Step 4:- Clone the git repo using command
git clone https://github.com/kmitsolution/k8s.git - Step 5:- Open Git Repo and Go to k8s/K8s-Vagrant/ on command terminal
- Step 6:- Install some vagrant plugins by running below command
vagrant plugin install vagrant-vbguest - Step 7:- Run below command to create Kubernetes Cluster (It will take around 10-15 mins)
vagrant up - Step 8:- Connect to Master server
vagrant ssh kmaster - Step 9:- Verify the cluster is in ready State
kubectl get nodes
Run the
vagrant plugin install vagrant-vbguest
vagrant up kmaster
vagrant up kworker1
vagrant up kworker2
Ssh
$ vagrant ssh kmaster
$ mkdir -p $HOME/.kube
$ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
$ sudo chown $(id -u):$(id -g) $HOME/.kube/config
$ kubectl version
$ kubectl cluster-info
$ kubectl get nodes
$ kubectl get nodes -w