Sudo swap crypto

Comment

Author: Admin | 2025-04-28

Installation on Ubuntu 20.04.1) Set hostname of Each NodeUse hostnamectl command to set hostname on each node, example is shown below:$ sudo hostnamectl set-hostname "k8s-master" // Run this command on master node$ sudo hostnamectl set-hostname "k8s-node-0" // Run this command on node-0$ sudo hostnamectl set-hostname "k8s-node-1" // Run this command on node-1Add the following entries in /etc/hosts files on each node,192.168.1.40 k8s-master192.168.1.41 k8s-node-0192.168.1.42 k8s-node-12) Disable swap and Add Kernel ModulesDisable swap and add following kernel module on all the nodes ( master + worker nodes).To disable swap, edit /etc/fstab file and comment out the line which includes entry either swap partition or swap file.$ sudo vi /etc/fstabSave & exit the fileRun swapoff command to disable the swap on the fly$ sudo swapoff -aNext, add kernel modules and enable IP forwarding,$ sudo tee /etc/modules-load.d/containerd.conf 3) Install Containerd Runtime on All NodesInstall containerd runtime on all the nodes, run following set of commands,Run Following apt command to install required dependencies for continaerd$ sudo apt install -y curl gnupg2 software-properties-common apt-transport-https ca-certificatesNext, add docker repository,$ sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/docker.gpg$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"After adding repo, install containerd using beneath commands,$ sudo apt update$ sudo apt install -y containerd.ioConfigure the contianerd using following command,$ containerd config default | sudo tee /etc/containerd/config.toml >/dev/null 2>&1$ sudo sed -i 's/SystemdCgroup \= false/SystemdCgroup \= true/g' /etc/containerd/config.tomlStart and enable containerd service$ sudo systemctl restart containerd && sudo systemctl enable containerdVerify containerd service, run$ sudo systemctl status containerd4) Install Kubectl,

Add Comment