Ansible Playbook for a Green Field Deployment Kubernetes Cluster
- Role for setting up OS
- Role for installing and configuring Container Runtime (containerd)
- Role for installing kubernetes
- Role for deploying kubernetes cluster (controlplanes)
- Role for deploying kubernetes worker node
- Role for deploying CNI (Calico)
- Role for deploying MetalLb
- Role for deploying Longhorn Storage
- Fetch kube config from control plane
- Add Upgrade playbook for k8s
- Add role for deploying ArgoCD
- Create ArgoCD Notifications Task
- Create Kubernetes Metrics Role
- Create a Task to rebalance the Nodes after new Node joins
- Deploy Kubernetes Dashboard
- Deploy External ETCD
- Add TLS configuration for argocd
- Properly configure kubelet for TLS
The below runs everything, you can also specify specific tags
ansible-playbook -i hosts.yaml all.yaml
The following 2 tags are needed to join deploy and join a new node leaving the existing nodes intact.
ansible-playbook -i hosts.yaml all.yaml --tags=packages,workers
This will check current kubelet version as well as current CNI (Calico), MetalLB and Longhorn
ansible-playbook -i hosts.yaml check_info.yaml
The below will upgrade kubernetes.
ansible-playbook -i hosts.yaml upgrade_k8s.yaml