Skip to content

martinmosegaard/kubernetes-training

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kubernetes-training

Create a Kubernetes cluster with Vagrant and VirtualBox.

This is meant as a cost-free alternative to the excellent tutorial Kubernetes The Hard Way, while being slightly more real than Minikube.

Prerequisites

Last tested with:

Setting up a Kubernetes cluster

Choose one of the OS directories.

The Vagrantfile can be used to start VMs for a Kubernetes cluster:

  • One master, k8s-master
  • Two workers, k8s-worker-0 and k8s-worker-1

Create and provision machines

vagrant up

Configure the Kubernetes cluster

./cluster-up.sh

Configure local kubectl for Kubernetes cluster

cp -i config ~/.kube/

Verify

$ kubectl get nodes
NAME           STATUS     ROLES     AGE       VERSION
k8s-master     Ready      master    48s       v1.9.1
k8s-worker-0   Ready      <none>    29s       v1.9.1
k8s-worker-1   Ready      <none>    23s       v1.9.1

Then perform some smoke tests like using your local kubectl to run a container as done here: https://github.com/kelseyhightower/kubernetes-the-hard-way/blob/master/docs/13-smoke-test.md

Destroy machines

vagrant destroy -f

About

Kubernetes training

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published