elifish4 / k8s-vagrant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prerequisite

Install virtualbox:

https://www.virtualbox.org/wiki/Downloads

Install Hasicorp vagrant:

https://www.vagrantup.com/

Usage

in order to provision the cluster- execute the following commands.

cd <VAGRANT_FOLDER_PATH>
vagrant up

Set Kubeconfig file varaible:

cd <VAGRANT_FOLDER_PATH>
cd configs
export KUBECONFIG=$(PWD)/config

or you can copy the config file to .kube directory.

cp config ~/.kube/

Kubernetes Dashboard URL:

http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/overview?namespace=kubernetes-dashboard

Kubernetes login token:

Vagrant up will create the admin user token and saves in the configs directory.

cd <VAGRANT_FOLDER_PATH>
cd configs
cat token

To see status of the cluster:

cd <VAGRANT_FOLDER_PATH>
vagrant status

To ssh into the nodes:

cd <VAGRANT_FOLDER_PATH>
vagrant ssh [ master | node01 | node02 ]

To shutdown the cluster:

vagrant halt

To destroy the cluster:

vagrant destroy -f

About


Languages

Language:Shell 100.0%