UPDATE & SYSTEM APPICATION IN MASTER AND WORKER NODES
sudo apt-get update && sudo apt-get upgrade
INSTALL DOCKER IN SLAVE & MASTER
sudo apt install docker.io -y
sudo chmod 666 /var/run/docker.sock
INSTALL PACKAGES FOR MASTER & SLAVES
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg
sudo mkdir -p -m 755 /etc/apt/keyrings
ADD KUBERNETES REPO AND CPG KEYS IN BOTH MASTER AND WORKER NODES
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.28/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.28/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list
UPDATE PACKAGES IN ALL THE NODES
sudo apt update
INSTALL COMPONENTS IN ALL THE NODES
sudo apt install -y kubeadm=1.28.1-1.1 kubelet=1.28.1-1.1 kubectl=1.28.1-1.1
INITIALIZE THE MASTER NODE | NB: ONLY ON MASTER
sudo kubeadm init --pod-network-cidr=10.244.0.0/16
CONFIGURE KUBERNETES CLUSER | NB: ONLY ON MASTER
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
DEPLOY CALICO |A NETWOKING SOLUTION | NB: ONLY ON MASTER
kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
DEPLOY INGRESS CONTROLLER | NB: ONLY ON MASTER
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.49.0/deploy/static/provider/baremetal/deploy.yaml
Top comments (0)