Skip to content

MauroSoli/kubernetes-vagrant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes provisioning with Vagrant

The goal of this project is provisioning locally a Kubernetes Cluster, following all the best practies specified in kubernetes.io docs (at least 2 master nodes, 2 worker nodes and 3 external etcd clusters). Anyway you can choose a lower number of master and worker nodes.


How to manage the desired state

You can specify the number of desired nodes and desired amount of CPU and RAM for each nodes, modifying some variables on the first section of the VagrantFile (NUM_MASTER_NODE, NUM_WORKER_NODE, NUM_ETCD_NODE):


# default variables
NUM_MASTER_NODE = 2
NUM_WORKER_NODE = 2
NUM_ETCD_NODE = 3 # Currently it cannot be changed

IP_NW = "192.168.56."
MASTER_IP_START = 1
NODE_IP_START = 20
ETCD_IP_START = 10
BALANCER_IP_START = 15

BALANCER_CPU = 2
BALANCER_RAM = 1024
MASTER_CPU   = 2
MASTER_RAM   = 2048
WORKER_CPU   = 2
WORKER_RAM   = 1024
ETCD_CPU     = 2
ETCD_RAM     = 1024

Certificates must be present on ./certificate folder.
The current certificates are present for testing purposes only.
You can create it using the following guide: https://kubernetes.io/docs/tasks/administer-cluster/certificates/
or https://phoenixnap.com/kb/kubernetes-ssl-certificates



Prerequisites

  1. Vagrant software https://www.vagrantup.com/

  2. At least 10GB of RAM (using default variables value). For detail about minium requirements in Kubernetes see https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/

  3. Pick your favourite hypervisor between KVM, Hyper-v, VMware or VirtualBox (Use KVM or Hyper-v for better performance). VMware are not tested yet.



How it works

git clone [email protected]:MauroSoli/kubernetes-vagrant.git
cd ./kubernetes-vagrant
vagrant up --parallel

For using a specific provider (hypervisor):

git clone [email protected]:MauroSoli/kubernetes-vagrant.git
cd ./kubernetes-vagrant
vagrant up --provider virtualbox --parallel

Look out: if you use Virtualbox on Windows, you should temporarily disable UAC

oracle/vagrant-projects#288

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages