Skip to content

A local Kubernetes cluster using Packer, Vagrant and Kubeadm

Notifications You must be signed in to change notification settings

PhilippeChepy/vagrant-kubernetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TL;DR

The goal of this repository is to set up a Kubernetes (1.20) cluster in vagrant. You need to have packer, virtualbox and vagrant installed on your workstation.

Start:

make start

Cleanup:

make clean

Forward local ports to cluster Ingress Controller

Traefik is set up as default Ingress Controller. It is possible to forward all queries from the host ports 80 and 443 to cluster's Ingress Controller, running the extra/local-lb.sh script.

In order for this script to work, you need to have docker installed on your host, as it creates a vagrant-kubernetes-haproxy container.

Components

  • Kubernetes 1.20

  • containerd as container runtime (CRI plugin)

  • Cilium as CNI

  • Traefik as Ingress Controller

  • Longhorn as (optional) volume provisioner To enable longhorn deployment, set storage_volume_snapshost_controller and storage_longhorn to true in Vagrantfile

Networking

  • VMs are in a shared network in the 10.80.0.0/16 subnet
  • Kubernetes Services are in the 10.96.0.0/12 subnet
  • Kubernetes Pods are in the 10.112.0.0/12 subnet

References

Author

Philippe Chepy