Setup cluster kubernetes 3 node with kubeadm using ansible
Environment
| hostname | ip | os | nginx version | virtualization | note |
|---|---|---|---|---|---|
| ops-master | 10.10.10.60 | 20.04.6 LTS (Focal Fossa) | nginx version: nginx/1.18.0 (Ubuntu) | kvm | Loadbalancer & client servers |
| ops-worker-1 | 10.10.10.61 | 20.04.6 LTS (Focal Fossa) | nginx version: nginx/1.18.0 (Ubuntu) | kvm | client servers |
| ops-worker-2 | 10.10.10.62 | 20.04.6 LTS (Focal Fossa) | nginx version: nginx/1.18.0 (Ubuntu) | kvm | client servers |
Setup ssh
Setup ssh for all node for ssh passwordless to user
execute from master-1
| |
copy /.ssh/id.rsa.pub to all node
| |

insert id_rsa.pub master to all worker node
| |

after insert idrsa.pub , test ssh to all worker node to user root , make sure the ssh passwordless
Setup ansible
Install ansible on master node
| |
| |
| |
makesure ansible has been installed
| |
