To allow 10.0.x.x IP addresses, create the following file on the host machine: /etc/vbox/networks.conf
Then add the following entries:
* 10.0.0.0/24 192.168.0.0/16
- Ubuntu 20.04
- Vagrant version == 2.3.4
- Ansible version == 2.14.2
- Python version == 3.9.2
- Container runtime cri-o
- Kubernetes version == 1.26.1. If required you can specify version via
--kubernetes-version [version]
option forkubeadm
command - Calico network plugin from https://raw.githubusercontent.com/projectcalico/calico/v3.25.0/manifests/calico.yaml
Join tokens are obtained via shared folders:
- On host machine:
host_share
- On VM worker nodes:
guest_share
To check functioning of the cluster:
- Check Kubernetes components are up and running:
kubectl get po -n kube-system
- Check worker nodes are up and running:
kubectl get no
- To start VMs:
vagrant up
- To shutdown machines:
vagrant halt
- To destroy machines:
vagrant destroy
- To ssh into VM:
vagrant ssh [vm_name]
- To list all VMs:
vagrant global-status --prune
- How to setup Kubernetes cluster with kubeadm on Ubuntu 20.04
apt-mark hold
andapt-mark unhold
with ansible modules- The IP address configured for the host-only network is not within the allowed ranges
- https://github.com/techiescamp/kubeadm-scripts
- https://devopscube.com/setup-kubernetes-cluster-kubeadm/
- How to set Linux environment variables with Ansible
- Not possible to source .bashrc with Ansible
- Reduce Vagrant code duplication by using functions