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.pub
key to the~/.ssh/authorized_keys
on 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.yml
playbook 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
,kubeadm
are installed correctly.