Setting up kubernetes cluster with the help of ansible playbooks.
How to use this (Setup Instructions):
- Make all of your servers ready including the master and the worker nodes and make sure that they are all connected with the same network.
- Make an entry of your each hosts in /etc/hosts file for name resolution.
- Internet connection must be enabled in all nodes, required packages will be downloaded from kubernetes official yum repository.
- Clone this repository into your master node.
- There is a file "hosts" available , Just make your entries of your all kubernetes nodes.
- Provide your server details in "env_variables" file.
- Deploy the ssh key from master node to other nodes for password less authentication using >ssh-keygen. Copy the public key to all nodes including your master node and make sure you are able to login into any nodes without password.
- Run "kubernetes_cluster_setup.yml" playbook to setup all nodes and kubernetes master configuration as >ansible-playbook kubernetes_cluster_setup.yml
- Run "join_workers_nodes.yml" playbook to join the worker nodes with kubernetes master node after setting up cluster as >ansible-playbook join_workers_nodes.yml
- Verify the configuration from master node using >kubectl get nodes