This projects sets up a Kubernetes environment based on VirtualMachines (VMs). The network will contain one Kubernetes Master VM and 3 Worker VMs.
Requirements are described below.
vagrant up
- Create and bring up the clustervagrant ssh kmaster
- Connect to Kubernetes master nodekubectl cluster-info
- Retrieve Kubernetes cluster info
You should see:
Kubernetes master is running at https://172.42.42.100:6443
KubeDNS is running at https://172.42.42.100:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
kubectl get nodes
- List all nodes in the Kubernetes cluster
NAME STATUS ROLES AGE VERSION
kubemaster Ready master 18m v1.17.1
kubi1 Ready <none> 16m v1.17.1
kubi2 Ready <none> 14m v1.17.1
kubi3 Ready <none> 12m v1.17.1
vagrant up
- Create and bring up the VMsvagrant halt
- Bring down all VMsvagrant destroy
- Bring down and delete all VMsvagrant status
- Check status of the VMsvagrant ssh [node]
- Connect to node via SSH
For a complete list of commands see the Vagrant-CLI
In order of layers deployed.
- VirtualBox - hypervisor
- Vagrant - deployment manager
- Kubernetes - containerized applications manager
- flannel - overlay network for Kubernetes
Install dependencies with: apt-get install vagrant virtualbox
(Jan 2020)
Note: libvirt
which is debian's default provisioner. Is not required for this setup.