Ansible playbook for quick Kubernetes setup on a Linux node
Based on a Digital Ocean's tutorial How To Create a Kubernetes 1.11 Cluster Using Kubeadm on Ubuntu 18.04 .
- Install Ansible on your local machine (not the node you are intending to run Kubernetes).
- For each of nodes add your
~/.ssh/id_rsa.pubkey to the~/.ssh/authorized_keyson the node so that Ansible can connect via SSH keys. - Test that you can actually connect to the node without password by
ssh root@ip.or.domain. - Then use the
initial.ymlplaybook and run it withansible-playbook -i hosts ./initial.yml. - Follow with
ansible-playbook -i hosts ./kube-dependencies.yml - Log to your node and confirm that
docker --version,kubectl,kubeadmare installed correctly.