Creating a Kubernetes Cluster using Kubeadm
Creating a kubernetes cluster using kubeadm 1.26.0
Tom Cruise
Creating a Kubernetes cluster using kubeadm version 1.26.0-00
In this blog, you wil learn how to create a single head kubernetes cluster using kubeadm. It is community-supported independent tool. It is mainly to become the primary tool to build a Kubernetes cluster. The kubeadm is a tool that helps you to create a single host or multiple host Kubernetes cluster in your on-premises or cloud environments.
Pre-requisite:
OS: Mac/Linux(Debian, Ubuntu, CentOS)
RAM: Minimum 2GiB or more per system (Recommended 8GiB)
CPUs: 2Cpus on the machine
Dependency: CRI & Calico
Environment: Public or Private cloud/On-Premises/ LapTop/Macbook
Instructions
Log into the server and run the following commands with root mode.
# update and upgrade the system
$ apt-get update && apt-get upgrade -y
and follows the instruction, select "yes" option during the package upgrades and make sure that all other dependencies are installed. i.e wget, curl, vim/nano.
$ apt install curl apt-transport-https vim git wget gnupg2 software-properties-common lsb-release ca-certifictes uidmap -y
To run the kubernetes cluster, you need the container environment such as containerd, cri-o and Docker on older clusters. we are using containerd which is commonly used by our community and cloud providers.
Install the kubeadm
$ apt-mark unhold kubeadm kubelet kubectl
$ apt-get install -y kubeadm=1.26.0-00
$ apt-mark hold kubeadm
Drain the node(CP) using kubectl
$kubectl drain node <control_plane-node_name>
$kubeadm upgrade plan
$ kubeadm upgrade apply 1.26.0-00