Welcome to 1 click Kubernetes World , Lets take a sneek peak on how we can install Kubernetes multi-master cluster .
We are building the Kubernetes cluster on basis of following compeonents
- Ubuntu server 20.04 LTS Versions
- Containerd as runtime
- Kubernetes orchestration of course :)
- Kubernetes Dashboard
- Flanneld for Networking
- Calico for network policy management
- Prometheus Monitoring
- Grafana for Metrics
Pre-Requesties
Ubuntu Server image 20.04 for master and worker nodes . https://releases.ubuntu.com/20.04/ubuntu-20.04.4-live-server-amd64.iso
Get your server's ready with unique ip and set hostnames as specified (or as your wish) .
- k8s-control1.example.com
- k8s-control2.example.com
- k8s-worker1.example.com
- k8s-worker2.example.com
** Make sure interenet is accesibe to all the systems's .
Installation Steps
*** Steps Need to be done on all four Instanes ***
Download Git Deploy folder to all four instance
sudo wget https://github.com/kubernetes-quickdeploy/one-click-k8s/archive/refs/heads/main.zip
Unzip the downloaded
unzip main.zip
Assign executable permission to deploy folder
chmod +x /one-click-k8s-main/deploy/*
*** Kubernetes Installation part ***
1) Run k8s-core.sh script on all four nodes both on control node and worker node .
./k8s-core.sh
2) Run k8s-controlplane.sh script on two control nodes
./k8s-controlplane.sh
Example kubeadm join commands:
For control-plane nodes:
sudo kubeadm join --discovery-token abcdef.1234567890abcdef --discovery-token-ca-cert-hash sha256:1234..cdef --control-plane 1.2.3.4:6443
3) Run output of token using kubeadm join command in worker nodes .
Example kubeadm join commands For worker nodes
sudo kubeadm join --discovery-token abcdef.1234567890abcdef --discovery-token-ca-cert-hash sha256:1234..cdef <IP-ADDRESS>:6443
4) Once Control plane and worker nodes are in ready state
Kubectl get nodes
5) Run k8s-pod-stack.sh to install Calico, Kuberenetes dashboard , Prometheus , Grafana
./k8s-pod-stack.sh