DEV Community

Cover image for How to Install & Setup K8-Cluster using kubeadm
Eze Sugar πŸ‘©β€πŸ’»
Eze Sugar πŸ‘©β€πŸ’»

Posted on

How to Install & Setup K8-Cluster using kubeadm

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

UPDATE PACKAGES IN ALL THE NODES

sudo apt update
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

INITIALIZE THE MASTER NODE | NB: ONLY ON MASTER

sudo kubeadm init --pod-network-cidr=10.244.0.0/16
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

DEPLOY CALICO |A NETWOKING SOLUTION | NB: ONLY ON MASTER

kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Image of Timescale

πŸš€ pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applicationsβ€”without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more β†’

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more