Skip to content

mtyler/vagrant-kubeadm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vagrant based K8s cluster for personal use

Prerequisites

A working Vagrant setup using VMware Fusion on MacOS ARM64.

Bring Up the Cluster

To provision the cluster, execute the following commands.

Important Note: You may or may not need to use sudo with all the vagrant commands.

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

# bring up the proxy 
vagrant up k8scp

# bring up first Control Plane
vagrant up cp1

# once cp1 is successfully running, any other combination of nodes can 
# be added or not
vagrant up cp2 cp3 n1 n2 n3

Once the cluster is up you should see the following files created

  • ./scripts/kubeadm-join-node.sh
  • ./scripts/kubeadm-join-cp.sh
  • ./scripts/kubeadm-init-cp1.out
  • ./scripts/kubeconfig

Set Kubeconfig file variable

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

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

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

cd vagrant-kubeadm
mv kubeconfig ~/.kube/config

Validate the cluster access

kubectl get po -n kube-system

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