MutantMahesh's Blog

Seeking to know.

May 11, 2021 - 1 minute read - Docker Kubernetes Raspberry PI

Install docker and kubernetes on raspberry pi

I have two raspberry PI up and running with the below given specs. One control plane machine and one node to be used for running containerized workloads. You can add more nodes to suit your desired use case and load, for example using two/three control plane nodes for HA.

Server Type Server Hostname Specs
Master/ Control plane Ajet 48GB Ram, 2vcpus
Worker Bjet 2GB Ram, 2vcpus

Step 1: Update the system

sudo apt update
sudo apt -y upgrade && sudo systemctl reboot

Step 2: Install kubelet, kubeadm and kubectl

sudo apt update
sudo apt -y install curl apt-transport-https
curl -s | sudo apt-key add -
echo "deb kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list

sudo apt update
sudo apt -y install vim git curl wget kubelet kubeadm kubectl
sudo apt-mark hold kubelet kubeadm kubectl

Step 3: Disable Swap

dphys-swapfile swapoff
dphys-swapfile uninstall
update-rc.d dphys-swapfile remove
rm -f /etc/init.d/dphys-swapfile

service dphys-swapfile stop
systemctl disable dphys-swapfile.service