Configure the system in an IaC way to automate the deployment of multiple servers.
-
Written in YML format, easy to use and maintain
-
Use SSH to communicate with remote server groups
-
No need to install intermediate agents in remote server groups
Based on the above characteristics, we can quickly deploy the Kubernetes Cluster through Anisble.
- Ubuntu
- 20.04
- Flannel
- VXLAN
- host-gw
- Calico
- Docker
- containerd
- cri-o
- Support single master control plane -
ansible-playbook -i hosts build-k8s-cluster.yaml -K
- Support high available control plane -
ansible-playbook -i hosts build-ha-k8s-cluster.yaml -K
- worker -
ansible-playbook -i hosts add-worker-node.yaml -K
- master
- Reset the cluster -
ansible-playbook -i hosts reset-cluster.yaml -K
- kubeadm
- Replace CRI
- Edit
hosts
andgroup_vars/all.yaml
as your desired