dyrnq / kubeadm-vagrant

Run kubernetes cluster with kubeadm on vagrant.
1 stars 5 forks source link
containerd cri-o docker helm kubeadm kubeadm-cluster kubeadm-ha kubernetes nerdctl vagrant vagrantfile virtualbox

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