- Setup SSH connection to master and worker nodes
- Add nodes hosts to the
/etc/ansible/hosts
:
[master_nodes]
master-node-host ansible_user=kubernetes
[worker_nodes]
worker-node-host1 ansible_user=kubernetes
worker-node-host2 ansible_user=kubernetes
worker-node-host3 ansible_user=kubernetes
- Run
kubernetes-cluster.yml
playbook to setup Kubernetes cluster:
ansible-playbook kubernetes-cluster.yml
ansible-playbook kubernetes-cluster-single-node.yml -e target=master-node-host -u kubernetes