Skip to content

mtyler/vagrant-kubeadm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vagrant based K8s cluster for personal use

Prerequisites

A working Vagrant setup using VMware Fusion on MAC.

Bring Up the Cluster

To provision the cluster, execute the following commands.

Important Note: You have to use sudo with all the vagrant commands.

git clone https://github.com/mtyler/vagrant-kubeadm.git
cd vagrant-kubeadm
sudo vagrant up

Once the cluster is up, run kubeadm using the provided script on the control plane node

cd vagrant-kubeadm
vagrant ssh cp1
sudo /vagrant/scripts/kubeadm-init-cp1.sh

Follow the instructions in the log output to join remaining nodes

Set Kubeconfig file variable

You can connect to the Vagrant cluster from your local mac terminal by configuring the following.

cd vagrant-kubeadm
cd configs
sudo chmod +r config 
export KUBECONFIG=$(pwd)/config

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

cp config ~/.kube/

Validate the cluster access

kubectl get po -n kube-system

Tasks

There are a number of scripts under the tasks folder that may/may not be useful.

To shutdown the cluster,

sudo vagrant halt

To restart the cluster,

sudo vagrant up

To destroy the cluster,

sudo vagrant destroy -f

About

No description, website, or topics provided.

Resources

License

CC0-1.0, GPL-3.0 licenses found

Licenses found

CC0-1.0
LICENSE
GPL-3.0
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages