You can create a local environment by using Vagrant. The document below describes pre-requisites for ILKE local environment and how you can start using them.
- Vagrant
- VirtualBox
We use Vagrant and VirtualBox to deploy local environments.
Test environments are located in labs folder
This labs folder contains a set of sub-folders for each configuration you may want to implement. Feel free to customize VagrantFiles according to your need !
-
Simply open a terminal and goto labs/XX folder where XX is the configuration you went to deploy.
-
Once you are located on the folder that contains your file "Vagrantfile", run the command:
vagrant up
- Once ILKE installation is finished, a kubeconfig file ("config") is generated next to your Vagrantfile. You can use this file to manage your Kubernetes installation with kubectl, or you can connect to the deploy machine with the following command:
vagrant ssh deploy
- Kubernetes CLI "kubectl" is configured for root user, so use the following command to become root:
sudo su
- You can now enjoy your ILKE/K8S fresh cluster ! Use the following command to print K8S version:
kubectl version
- IF you want to stop your kubernetes cluster, juste go to your Vagrantfile folder and run:
vagrant halt -f
You can also start again your K8S cluster with vagrant up
- If you want to destroy your local cluster, just run:
vagrant destroy -f