Skip to content

dyrnq/kubeadm-vagrant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kubeadm-vagrant

Run kubernetes cluster with kubeadm on vagrant.

Reference: Creating Highly Available clusters with kubeadm

Requirements

  1. virtualbox: https://www.virtualbox.org/wiki/Downloads
  2. vagrant: https://www.vagrantup.com/downloads.html

Usage

Single-Master

Change MASTER_COUNT to 1 to run a Single-Master.

vagrant up master1 worker1
vagrant ssh master1

kubectl cluster-info
kubectl get nodes

Multi-Master

Change MASTER_COUNT to 3 to run a Multi-Master cluster.

vagrant up master1 master2 master3 worker1
vagrant ssh master1

kubectl cluster-info
kubectl get nodes

Pod Network

Reference: Installing a Pod network add-on

calico

Change POD_NETWORK to /vagrant/kube-calico.yaml to run use calico. See origin calico.yaml

kube-calico.yml changes: explicitly assign env CALICO_IPV4POOL_CIDR and IP_AUTODETECTION_METHOD

flannel

Change POD_NETWORK to /vagrant/kube-flannel.yml to run use flannel. See origin kube-flannel.yml

kube-flannel.yml changes: added the --iface option (ref)

Ref