Deploy a testing k8s environment with vagrant.
- 1 Master
- 1 Worker
- CPU: 4 Cores / 8 Threads
- RAM: 8GB
- OS: Linux/Unix
- Packages Installed:
- Ansible
- Virtualbox
- Vagrant
- make # Optional for Makefile commands
The following steps were designed for making easy the use of this repository using make.
We are gonna start cloning this repo:
git clone https://github.com/AudelDiaz/kubeadm-cluster.git
When you run the cluster at the first time vagrant creates VM's defined in Vagrantfile and provisions them using Ansible.
make deploy
For ssh access you just need to use VM name.
vagrant ssh master
vagrant ssh worker
When you finish you can destroy the testing environment and recover machine resources.
make clean
make start
: Start VM'smake stop
: Stop VM'smake install
: Install kubernetes clustermake tools
: Install Metrics Server and Weave Scopemake copy-config
: Copy master ~/.kube/config to host machine. (If you have a previews setup, make a backup and delete the original to create a new one.)
If you have installed monitoring tools using make tools
and copied .kube/config to your host with make copy-config
, you are able to open Weave Scope with this command:
kubectl port-forward -n weave "$(kubectl get -n weave pod --selector=weave-scope-component=app -o jsonpath='{.items..metadata.name}')" 4040
For more content please visit https://audeldiaz.work