Deploy a Kubeadm Kubernetes cluster with Vagrant and Ansible.
Update NODE_NETWORK_BASE
in Vagrantfile
with your network prefix if you have virtalbox network limitations.
Deploy the Kubernetes cluster :
vagrant up
Useful commands :
# to see the current status
cd ./kubeadm-automation
vagrant status
# to access to the kubernetes cli
vagrant ssh k8s-master
alias k=kubectl
k get nodes
# Relaunch the Ansible code (if needed)
vagrant provision # it executes the file : site.yml
Stop the VMs :
vagrant halt
Remove the Kubernetes cluter :
vagrant destroy -f
Based on kubeadm-ansible, ansible-role-ntp and ansible-role-locale.