Once we have the preceding prerequisites, we have to perform some simple steps:
- Clone the Ansible Playbook from my GitHub page and change the directory to see the files present in the cloned directory:
# git clone https://github.com/nikitsrj/Kubernetes-Cluster- Ansible.git # cd Kubernetes-Cluster-Ansible # ls ansible-playbook.yml hosts K8SCONFIG LICENSE mkcrt README.md roles
- Now, edit the hosts file and replace the public IP of Master in place of xx.xx.xx.xx under [kubemaster]. Similarly, replace the public IP of Node in place of xx.xx.xx.xx under [kubenode]. Also, rename your private key (you generated in the beginning ) as kubernetes-cluster.pem and move it to ~/.ssh folder if its not there. Make sure the key file permission ...