Script to bootstrap k8s cluster the hard way with Virtualbox
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin _ssh: Enforce ssh with IdentitiesOnly yes Jan 19, 2019
etc etc/ change default settings Jan 19, 2019
helm helm/traefik: very simple helm to install traefi Jan 18, 2019
.gitignore .gitignore: update Jan 18, 2019 README: clean up Jan 18, 2019

Bootstrap a k8s cluster the hardway with VirtualBox

k8s the hardway requires an admin access on GKE. I slightly modify the process to bootstrap a k8s cluster on my VirtualBox environment (thanks to Vagrant.) And yes I have a script to automate the process.

Getting started

Install basic tools

  • VirtualBox (pacman -S virtualbox)
  • Vagrant (pacman -S vagrant)
  • (Please install all tools with go get -u and modify your PATH environment variable to recognize these new tools installed in $GOPATH/bin.)
  • kubectl command line

Bootstrap the cluster

Edit some basic settings in ./etc/ and start the cluster:

./bin/ _env   # Print basic information
./bin/ _test  # Create new cluster

Running smoke tests

./bin/ _smoke_tests
./bin/ _smoke_test_deploy_app

kubectl configuration will be stored under ./etc/.kube/config. You can execute the tool via the wrapper, for examples:

./bin/ _kubectl get nodes
worker-141   Ready    <none>   100s   v1.12.0

(You can also use the shortcut ./bin/_kubectl)


To enter a node, use the wrapper script:

./bin/ _ssh_list
./bin/ _ssh 111

You can also use different aliases provided in the output of _ssh_list.

Tear down

./bin/ _vagrant destroy -f

In-depth docs, details and customizations